diff options
| author | Stefan Monnier | 2009-05-11 15:35:44 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-05-11 15:35:44 +0000 |
| commit | a9e3ff690bba45e6723e9d355517767d8b52d41a (patch) | |
| tree | 8df7f7594ca103fc18835b42e6590f60ec093fed | |
| parent | 9cb363dbdae22fb8e00a400516da140d62434a3d (diff) | |
| download | emacs-a9e3ff690bba45e6723e9d355517767d8b52d41a.tar.gz emacs-a9e3ff690bba45e6723e9d355517767d8b52d41a.zip | |
(completion-setup-function):
Only modify the default-directory in *Completions* (bug#3250).
Take partial-completion into account when setting default-directory.
| -rw-r--r-- | lisp/ChangeLog | 32 | ||||
| -rw-r--r-- | lisp/simple.el | 20 |
2 files changed, 28 insertions, 24 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 073d45db526..55f9f16e014 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2009-05-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * simple.el (completion-setup-function): | ||
| 4 | Only modify the default-directory in *Completions* (bug#3250). | ||
| 5 | Take partial-completion into account when setting default-directory. | ||
| 6 | |||
| 1 | 2009-05-10 Chong Yidong <cyd@stupidchicken.com> | 7 | 2009-05-10 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 8 | ||
| 3 | * emacs-lisp/cl-macs.el (lexical-let*): Doc fix (Bug#3178). | 9 | * emacs-lisp/cl-macs.el (lexical-let*): Doc fix (Bug#3178). |
| @@ -16,26 +22,22 @@ | |||
| 16 | 22 | ||
| 17 | 2009-05-08 Kenichi Handa <handa@m17n.org> | 23 | 2009-05-08 Kenichi Handa <handa@m17n.org> |
| 18 | 24 | ||
| 19 | * international/encoded-kb.el (encoded-kbd-setup-keymap): Fix for | 25 | * international/encoded-kb.el (encoded-kbd-setup-keymap): |
| 20 | big5. | 26 | * international/mule-diag.el (describe-coding-system): Fix for big5. |
| 21 | |||
| 22 | * international/mule-diag.el (describe-coding-system): Fix for | ||
| 23 | big5. | ||
| 24 | 27 | ||
| 25 | 2009-05-07 Martin Rudalics <rudalics@gmx.at> | 28 | 2009-05-07 Martin Rudalics <rudalics@gmx.at> |
| 26 | 29 | ||
| 27 | * window.el (split-window-sensibly): New function. | 30 | * window.el (split-window-sensibly): New function. |
| 28 | (split-height-threshold, split-width-threshold): State in | 31 | (split-height-threshold, split-width-threshold): State in |
| 29 | doc-string that these affect split-window-sensibly. Change | 32 | doc-string that these affect split-window-sensibly. |
| 30 | customization subtype from number to integer. | 33 | Change customization subtype from number to integer. |
| 31 | (window--splittable-p): Rename to window-splittable-p since it's | 34 | (window--splittable-p): Rename to window-splittable-p since it's |
| 32 | referred to in doc-string of split-window-sensibly. Update | 35 | referred to in doc-string of split-window-sensibly. Update doc-string. |
| 33 | doc-string. | ||
| 34 | (window--try-to-split-window): Unconditionally call | 36 | (window--try-to-split-window): Unconditionally call |
| 35 | split-window-preferred-function and move splitting functionality | 37 | split-window-preferred-function and move splitting functionality |
| 36 | to split-window-sensibly (Bug#3142). | 38 | to split-window-sensibly (Bug#3142). |
| 37 | (split-window-preferred-function): Rewrite doc-string. Don't | 39 | (split-window-preferred-function): Rewrite doc-string. |
| 38 | allow nil as customization type. | 40 | Don't allow nil as customization type. |
| 39 | 41 | ||
| 40 | 2009-05-07 Chong Yidong <cyd@stupidchicken.com> | 42 | 2009-05-07 Chong Yidong <cyd@stupidchicken.com> |
| 41 | 43 | ||
| @@ -104,8 +106,8 @@ | |||
| 104 | * progmodes/cc-langs.el (c-constant-kwds): New ObjC keywords | 106 | * progmodes/cc-langs.el (c-constant-kwds): New ObjC keywords |
| 105 | "YES", "NO", "NS_DURING", "NS_HANDLER", "NS_ENDHANDLER". | 107 | "YES", "NO", "NS_DURING", "NS_HANDLER", "NS_ENDHANDLER". |
| 106 | 108 | ||
| 107 | * progmodes/cc-align.el (c-lineup-ObjC-method-call-colons): New | 109 | * progmodes/cc-align.el (c-lineup-ObjC-method-call-colons): |
| 108 | function. | 110 | New function. |
| 109 | 111 | ||
| 110 | 2009-04-29 Chong Yidong <cyd@stupidchicken.com> | 112 | 2009-04-29 Chong Yidong <cyd@stupidchicken.com> |
| 111 | 113 | ||
| @@ -114,8 +116,8 @@ | |||
| 114 | 2009-04-29 Ulrich Mueller <ulm@gentoo.org> | 116 | 2009-04-29 Ulrich Mueller <ulm@gentoo.org> |
| 115 | 117 | ||
| 116 | * files.el (hack-local-variables-prop-line) | 118 | * files.el (hack-local-variables-prop-line) |
| 117 | (hack-local-variables, dir-locals-read-from-file): Bind | 119 | (hack-local-variables, dir-locals-read-from-file): |
| 118 | read-circle to nil before reading. | 120 | Bind read-circle to nil before reading. |
| 119 | 121 | ||
| 120 | 2009-04-28 Geert Kloosterman <g.j.kloosterman@gmail.com> (tiny change) | 122 | 2009-04-28 Geert Kloosterman <g.j.kloosterman@gmail.com> (tiny change) |
| 121 | 123 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index 082605f659d..13c75c4d7b2 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -5851,20 +5851,22 @@ Called from `temp-buffer-show-hook'." | |||
| 5851 | ;; after the text of the completion list buffer is written. | 5851 | ;; after the text of the completion list buffer is written. |
| 5852 | (defun completion-setup-function () | 5852 | (defun completion-setup-function () |
| 5853 | (let* ((mainbuf (current-buffer)) | 5853 | (let* ((mainbuf (current-buffer)) |
| 5854 | (mbuf-contents (minibuffer-completion-contents)) | 5854 | (base-dir |
| 5855 | common-string-length) | 5855 | ;; When reading a file name in the minibuffer, |
| 5856 | ;; When reading a file name in the minibuffer, | 5856 | ;; try and find the right default-directory to set in the |
| 5857 | ;; set default-directory in the minibuffer | 5857 | ;; completion list buffer. |
| 5858 | ;; so it will get copied into the completion list buffer. | 5858 | ;; FIXME: Why do we do that, actually? --Stef |
| 5859 | (if minibuffer-completing-file-name | 5859 | (if minibuffer-completing-file-name |
| 5860 | (with-current-buffer mainbuf | 5860 | (file-name-as-directory |
| 5861 | (setq default-directory | 5861 | (expand-file-name |
| 5862 | (file-name-directory (expand-file-name mbuf-contents))))) | 5862 | (substring (minibuffer-completion-contents) |
| 5863 | 0 (or completion-base-size 0))))))) | ||
| 5863 | (with-current-buffer standard-output | 5864 | (with-current-buffer standard-output |
| 5864 | (let ((base-size completion-base-size)) ;Read before killing localvars. | 5865 | (let ((base-size completion-base-size)) ;Read before killing localvars. |
| 5865 | (completion-list-mode) | 5866 | (completion-list-mode) |
| 5866 | (set (make-local-variable 'completion-base-size) base-size)) | 5867 | (set (make-local-variable 'completion-base-size) base-size)) |
| 5867 | (set (make-local-variable 'completion-reference-buffer) mainbuf) | 5868 | (set (make-local-variable 'completion-reference-buffer) mainbuf) |
| 5869 | (if base-dir (setq default-directory base-dir)) | ||
| 5868 | (unless completion-base-size | 5870 | (unless completion-base-size |
| 5869 | ;; This shouldn't be needed any more, but further analysis is needed | 5871 | ;; This shouldn't be needed any more, but further analysis is needed |
| 5870 | ;; to make sure it's the case. | 5872 | ;; to make sure it's the case. |