emacs-31 e050c74581c: vc-dir--count-outgoing: Bind enable-local-variables

Sean Whitton <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: emacs-31
commit e050c74581cdb13315482d40e1aca3ac0bfc4ff4
Author: Sean Whitton <[email protected]>
Commit: Sean Whitton <[email protected]>

    vc-dir--count-outgoing: Bind enable-local-variables
    
    * lisp/vc/vc-dir.el (vc-dir--count-outgoing): Bind
    enable-local-variables (bug#81233).  Do not merge to master.
---
 lisp/vc/vc-dir.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 5408a89799e..687968d5d24 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1433,7 +1433,13 @@ therefore also disable the fetching."
 
 (defun vc-dir--count-outgoing (backend)
   "Call `vc--count-outgoing' with a delayed message and local quits."
-  (let ((inhibit-quit t))
+  (let ((inhibit-quit t)
+        ;; Hack for bug#81233 for the Emacs 30 release.
+        (enable-local-variables
+         (if (memq enable-local-variables '(:safe :all nil))
+             enable-local-variables
+           ;; Ignore other values that query.
+           :safe)))
     (prog1
         (with-local-quit
           (with-delayed-message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.