Commit 8b718262 authored by Leo Liu's avatar Leo Liu

Don't modify minibuffer variables globally

* lisp/files.el (cd): Use setq-local instead.  (Bug#25260)
parent 5b5e0366
......@@ -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 "./"))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment