emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 8b71826: Don't modify minibuffer variables global


From: Leo Liu
Subject: [Emacs-diffs] emacs-25 8b71826: Don't modify minibuffer variables globally
Date: Sun, 25 Dec 2016 06:39:25 +0000 (UTC)

branch: emacs-25
commit 8b7182626e3dac556d1fc38a1193e7d5e386488e
Author: Leo Liu <address@hidden>
Commit: Leo Liu <address@hidden>

    Don't modify minibuffer variables globally
    
    * lisp/files.el (cd): Use setq-local instead.  (Bug#25260)
---
 lisp/files.el |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index 45646b1..962ced4 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -719,13 +719,13 @@ The path separator is colon in GNU and GNU-like systems."
     ;; (which will lead to the use of B/a).
     (minibuffer-with-setup-hook
         (lambda ()
-          (setq minibuffer-completion-table
-                (apply-partially #'locate-file-completion-table
-                                 cd-path nil))
-          (setq minibuffer-completion-predicate
-                (lambda (dir)
-                  (locate-file dir cd-path nil
-                               (lambda (f) (and (file-directory-p f) 
'dir-ok))))))
+          (setq-local minibuffer-completion-table
+                     (apply-partially #'locate-file-completion-table
+                                      cd-path nil))
+          (setq-local minibuffer-completion-predicate
+                     (lambda (dir)
+                       (locate-file dir cd-path nil
+                                    (lambda (f) (and (file-directory-p f) 
'dir-ok))))))
       (unless cd-path
         (setq cd-path (or (parse-colon-path (getenv "CDPATH"))
                           (list "./"))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]