diff options
Diffstat (limited to 'lisp/vc/vc-hooks.el')
-rw-r--r-- | lisp/vc/vc-hooks.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 4b3c829a2c6..cd5b11d840b 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -256,9 +256,9 @@ It is usually called via the `vc-call' macro." (defmacro vc-call (fun file &rest args) "A convenience macro for calling VC backend functions. Functions called by this macro must accept FILE as the first argument. -ARGS specifies any additional arguments. FUN should be unquoted. -BEWARE!! FILE is evaluated twice!!" - `(vc-call-backend (vc-backend ,file) ',fun ,file ,@args)) +ARGS specifies any additional arguments. FUN should be unquoted." + (macroexp-let2 nil file file + `(vc-call-backend (vc-backend ,file) ',fun ,file ,@args))) (defsubst vc-parse-buffer (pattern i) "Find PATTERN in the current buffer and return its Ith submatch." @@ -483,7 +483,7 @@ status of this file. Otherwise, the value returned is one of: (vc-call-backend backend 'state file))) (defsubst vc-up-to-date-p (file) - "Convenience function that checks whether `vc-state' of FILE is `up-to-date'." + "Convenience function to check whether `vc-state' of FILE is `up-to-date'." (eq (vc-state file) 'up-to-date)) (defun vc-working-revision (file &optional backend) @@ -627,7 +627,7 @@ Before doing that, check if there are any old backups and get rid of them." (declare-function vc-dir-resynch-file "vc-dir" (&optional fname)) -(defvar vc-dir-buffers nil "List of vc-dir buffers.") +(defvar vc-dir-buffers nil "List of `vc-dir' buffers.") (defun vc-after-save () "Function to be called by `basic-save-buffer' (in files.el)." @@ -864,7 +864,8 @@ In the latter case, VC mode is deactivated for this buffer." (defvar vc-prefix-map (let ((map (make-sparse-keymap))) (define-key map "a" #'vc-update-change-log) - (define-key map "b" #'vc-switch-backend) + (with-suppressed-warnings ((obsolete vc-switch-backend)) + (define-key map "b" #'vc-switch-backend)) (define-key map "d" #'vc-dir) (define-key map "g" #'vc-annotate) (define-key map "G" #'vc-ignore) |