From 25ebb9374bdadf66153727831fc7ff131c8cf299 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 14 Sep 2021 07:55:56 +0200 Subject: ; More minor docfixes found by checkdoc --- lisp/vc/vc-hooks.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/vc/vc-hooks.el') diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 4b3c829a2c6..06123106401 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -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)." -- cgit v1.2.3 From 5b962a7ad8d0acfe40a41ce139059b9c8e46f666 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 19 Sep 2021 22:39:20 +0100 Subject: Avoid double argument evaluation in vc-call macro * lisp/vc/vc-hooks.el (vc-call): Ensure second argument is evaluated only once (bug#50690). * etc/NEWS (Change Logs and VC): Announce this change in behavior. --- etc/NEWS | 3 +++ lisp/vc/vc-hooks.el | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'lisp/vc/vc-hooks.el') diff --git a/etc/NEWS b/etc/NEWS index 2bdcb6434b7..d80b9c0e66f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1749,6 +1749,9 @@ tags to be considered as well. *** New user option 'vc-git-log-switches'. String or list of strings specifying switches for Git log under VC. +--- +*** The macro 'vc-call' no longer evaluates its second argument twice. + ** Gnus +++ diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 06123106401..b7760e3bba5 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." -- cgit v1.2.3 From 52379a44cbfd7372a0ffd38ba5775461c92dbfb3 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 8 Nov 2021 00:26:32 +0100 Subject: Suppress a compilation warning about vc-switch-backend * lisp/vc/vc-hooks.el (vc-prefix-map): Suppress a warning about an obsolete command. --- lisp/vc/vc-hooks.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/vc/vc-hooks.el') diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index b7760e3bba5..cd5b11d840b 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.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) -- cgit v1.2.3