Spelling fixes.
[bpt/emacs.git] / lisp / vc / vc.el
index 6704a43..eea1a99 100644 (file)
 ;; * working-revision (file)
 ;;
 ;;   Return the working revision of FILE.  This is the revision fetched
-;;   by the last checkout or upate, not necessarily the same thing as the
+;;   by the last checkout or update, not necessarily the same thing as the
 ;;   head or tip revision.  Should return "0" for a file added but not yet
 ;;   committed.
 ;;
   :type 'boolean
   :group 'vc)
 
+(make-obsolete-variable 'vc-initial-comment "it has no effect." "23.2")
+
 (defcustom vc-default-init-revision "1.1"
   "A string used as the default revision number when a new file is registered.
 This can be overridden by giving a prefix argument to \\[vc-register].  This
@@ -1118,9 +1120,13 @@ merge in the changes into your working copy."
      ;; Files have local changes
      ((vc-compatible-state state 'edited)
       (let ((ready-for-commit files))
-       ;; If files are edited but read-only, give user a chance to correct
+       ;; If files are edited but read-only, give user a chance to correct.
        (dolist (file files)
-         (unless (file-writable-p file)
+         ;; If committing a mix of removed and edited files, the
+         ;; fileset has state = 'edited.  Rather than checking the
+         ;; state of each individual file in the fileset, it seems
+         ;; simplest to just check if the file exists.  Bug#9781.
+         (when (and (file-exists-p file) (not (file-writable-p file)))
            ;; Make the file+buffer read-write.
            (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file))
              (error "Aborted"))
@@ -2302,8 +2308,7 @@ to the working revision (except for keyword expansion)."
                                       (if (= nfiles 1) "" "s"))))))
            (error "Revert canceled")))
       (when diff-buffer
-       (delete-windows-on diff-buffer)
-       (kill-buffer diff-buffer)))
+       (quit-windows-on diff-buffer t)))
     (dolist (file files)
       (message "Reverting %s..." (vc-delistify files))
       (vc-revert-file file)
@@ -2349,8 +2354,7 @@ depending on the underlying version-control system."
     ;; Display changes
     (unless (yes-or-no-p "Discard these revisions? ")
       (error "Rollback canceled"))
-    (delete-windows-on "*vc-diff*")
-    (kill-buffer"*vc-diff*")
+    (quit-windows-on "*vc-diff*" t)
     ;; Do the actual reversions
     (message "Rolling back %s..." (vc-delistify files))
     (with-vc-properties
@@ -2686,7 +2690,7 @@ log entries should be gathered."
       (substring rev 0 index))))
 
 (defun vc-default-responsible-p (backend file)
-  "Indicate whether BACKEND is reponsible for FILE.
+  "Indicate whether BACKEND is responsible for FILE.
 The default is to return nil always."
   nil)