aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc.el
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2009-12-03 03:11:14 +0000
committerGlenn Morris <[email protected]>2009-12-03 03:11:14 +0000
commitd6e824528b1c20bcd61f2d35539e399343575b44 (patch)
tree8832eb70bfee07aba5ddb7d48802365ba6f3d392 /lisp/vc.el
parent31b62755af765b2ecfb745a80774f925c167ad84 (diff)
(log-view-vc-backend, log-view-vc-fileset): Declare.
(vc-print-log-internal): Fix previous change. (vc-revert): Correct pluralization.
Diffstat (limited to 'lisp/vc.el')
-rw-r--r--lisp/vc.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 616b9a34de..9bd6e338f3 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -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*"))