diff options
author | Richard M. Stallman <[email protected]> | 2003-01-20 09:03:09 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 2003-01-20 09:03:09 +0000 |
commit | c2639ed073fca89eb89e485cc8a4e20c1cb87afa (patch) | |
tree | 17101635eabe9be7bcc5194697e6598024d1e24d | |
parent | 2afd5e90eb946a0e70547e56a4c705d7d0d4cb7f (diff) |
(completion-setup-function): Set default-directory
in the minibuffer, so it'll be copied into the completion list buffer.
-rw-r--r-- | lisp/ChangeLog | 12 | ||||
-rw-r--r-- | lisp/simple.el | 9 |
2 files changed, 20 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 914109a1b8..61565d5fb1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2003-01-20 Richard M. Stallman <[email protected]> + + * simple.el (completion-setup-function): Set default-directory + in the minibuffer, so it'll be copied into the completion list buffer. + + * emacs-lisp/regexp-opt.el (regexp-opt-group): Compute HALF2 properly. + + * loadup.el (load-path): Rename `path' local var. + + * progmodes/octave-mod.el (octave-mode-map): Change C-c i bindings + to C-c C-i. Duplicate its bindings with last char a ctl char. + 2003-01-20 Markus Rost <[email protected]> * ls-lisp.el (ls-lisp-use-insert-directory-program): Make default diff --git a/lisp/simple.el b/lisp/simple.el index 39b2631d2b..c0028a0823 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3959,7 +3959,14 @@ The completion list buffer is available as the value of `standard-output'.") (defun completion-setup-function () (save-excursion - (let ((mainbuf (current-buffer))) + (let ((mainbuf (current-buffer)) + (mbuf-contents (minibuffer-contents))) + ;; When reading a file name in the minibuffer, + ;; set default-directory in the minibuffer + ;; so it will get copied into the completion list buffer. + (if minibuffer-completing-file-name + (with-current-buffer mainbuf + (setq default-directory (file-name-directory mbuf-contents)))) (set-buffer standard-output) (completion-list-mode) (make-local-variable 'completion-reference-buffer) |