]> code.delx.au - gnu-emacs/blobdiff - lisp/vc.el
(help-add-fundoc-usage): Use %S only for output of `help-make-usage'.
[gnu-emacs] / lisp / vc.el
index 5ef33045b328b2924ea4b087965e173b4fee6594..f48cbe20b1cdb8b2dfc394bda025e1eb57028afd 100644 (file)
@@ -7,7 +7,7 @@
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
 ;; Keywords: tools
 
-;; $Id: vc.el,v 1.373 2004/03/26 16:17:12 monnier Exp $
+;; $Id: vc.el,v 1.376 2004/04/16 10:21:24 spiegel Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -2348,13 +2348,23 @@ If FOCUS-REV is non-nil, leave the point at that revision."
     ;; Don't switch to the output buffer before running the command,
     ;; so that any buffer-local settings in the vc-controlled
     ;; buffer can be accessed by the command.
-    (if (> (length (vc-arg-list (vc-backend file) 'print-log)) 1)
+    (condition-case err
         (progn
           (vc-call print-log file "*vc-change-log*")
           (set-buffer "*vc-change-log*"))
-      ;; for backward compatibility
-      (vc-call print-log file)
-      (set-buffer "*vc*"))
+      (wrong-number-of-arguments
+       ;; If this error came from the above call to print-log, try again
+       ;; without the optional buffer argument (for backward compatibility).
+       ;; Otherwise, resignal.
+       (if (or (not (eq (cadr err)
+                        (indirect-function
+                         (vc-find-backend-function (vc-backend file)
+                                                   'print-log))))
+               (not (eq (caddr err) 2)))
+           (signal (car err) (cdr err))
+         ;; for backward compatibility
+         (vc-call print-log file)
+         (set-buffer "*vc*"))))
     (pop-to-buffer (current-buffer))
     (log-view-mode)
     (vc-exec-after