]> git.eshelyaron.com Git - emacs.git/commitdiff
(log-view-vc-backend, log-view-vc-fileset): Declare.
authorGlenn Morris <rgm@gnu.org>
Thu, 3 Dec 2009 03:11:14 +0000 (03:11 +0000)
committerGlenn Morris <rgm@gnu.org>
Thu, 3 Dec 2009 03:11:14 +0000 (03:11 +0000)
(vc-print-log-internal): Fix previous change.
(vc-revert): Correct pluralization.

lisp/ChangeLog
lisp/vc.el

index 33cc62cb5b33608e24d62da1f5fb6d6410b3b639..d4363f14c0f0e60310ef679ac42b9de0341ab19c 100644 (file)
@@ -1,3 +1,9 @@
+2009-12-03  Glenn Morris  <rgm@gnu.org>
+
+       * vc.el (log-view-vc-backend, log-view-vc-fileset): Declare.
+       (vc-print-log-internal): Fix previous change.
+       (vc-revert): Correct pluralization.
+
 2009-12-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/make-mode.el (makefile-special-targets-list): No need for
index 616b9a34dea595ebf52466b5670c6d7793449ac6..9bd6e338f372be733737c81c5b4b684b968a85eb 100644 (file)
@@ -1859,6 +1859,9 @@ If it contains `directory' then if the fileset contains a directory show a short
 If it contains `file' then show short logs for files.
 Not all VC backends support short logs!")
 
+(defvar log-view-vc-backend)
+(defvar log-view-vc-fileset)
+
 (defun vc-print-log-internal (backend files working-revision
                                       &optional limit)
   ;; Don't switch to the output buffer before running the command,
@@ -1882,8 +1885,8 @@ Not all VC backends support short logs!")
       ;; log-view-mode used to be called with inhibit-read-only bound
       ;; to t, so let's keep doing it, just in case.
       (vc-call-backend backend 'log-view-mode))
-    (set (make-local-variable 'log-view-vc-backend) ',backend)
-    (set (make-local-variable 'log-view-vc-fileset) ',files)
+    (set (make-local-variable 'log-view-vc-backend) backend)
+    (set (make-local-variable 'log-view-vc-fileset) files)
 
     (vc-exec-after
      `(let ((inhibit-read-only t))
@@ -1985,10 +1988,12 @@ to the working revision (except for keyword expansion)."
     (when (vc-diff-internal vc-allow-async-revert vc-fileset nil nil)
       (unless (yes-or-no-p
               (format "Discard changes in %s? "
-                      (let ((str (vc-delistify files)))
+                      (let ((str (vc-delistify files))
+                            (nfiles (length files)))
                         (if (< (length str) 50)
                             str
-                          (format "%d files" (length files))))))
+                          (format "%d file%s" nfiles
+                                  (if (= nfiles 1) "" "s"))))))
        (error "Revert canceled"))
       (delete-windows-on "*vc-diff*")
       (kill-buffer "*vc-diff*"))