diff options
author | Basil L. Contovounesios <contovob@tcd.ie> | 2021-09-19 22:39:20 +0100 |
---|---|---|
committer | Basil L. Contovounesios <contovob@tcd.ie> | 2021-09-21 12:30:58 +0100 |
commit | 5b962a7ad8d0acfe40a41ce139059b9c8e46f666 (patch) | |
tree | 76e2ec644dc3c5ecedcafd4971d869709f8d07cf /lisp/vc/vc-hooks.el | |
parent | 0646c6817139aa905a2f6079fdc82eb4be944de0 (diff) | |
download | emacs-5b962a7ad8d0acfe40a41ce139059b9c8e46f666.tar.gz emacs-5b962a7ad8d0acfe40a41ce139059b9c8e46f666.tar.bz2 emacs-5b962a7ad8d0acfe40a41ce139059b9c8e46f666.zip |
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.
Diffstat (limited to 'lisp/vc/vc-hooks.el')
-rw-r--r-- | lisp/vc/vc-hooks.el | 6 |
1 files changed, 3 insertions, 3 deletions
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." |