From: Leo Liu Date: Sun, 25 Dec 2016 06:37:51 +0000 (+0800) Subject: Don't modify minibuffer variables globally X-Git-Tag: emacs-25.1.91~6 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8b71826;p=emacs.git Don't modify minibuffer variables globally * lisp/files.el (cd): Use setq-local instead. (Bug#25260) --- diff --git a/lisp/files.el b/lisp/files.el index 45646b186af..962ced4f077 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 "./"))))