diff options
| author | Leo Liu | 2011-09-27 17:28:03 +0800 |
|---|---|---|
| committer | Leo Liu | 2011-09-27 17:28:03 +0800 |
| commit | 7690bdea13eadb315a9a78428ddce2e9886b4e01 (patch) | |
| tree | 323632544f2ada97cc97c1ec2599cb4c109d5d48 | |
| parent | ed497dd4ec3137c43637531a0fa14a0f78edbe25 (diff) | |
| download | emacs-7690bdea13eadb315a9a78428ddce2e9886b4e01.tar.gz emacs-7690bdea13eadb315a9a78428ddce2e9886b4e01.zip | |
Accept cons cell HIST arg in ido-read-internal
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/ido.el | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fa350161555..ec867fee08b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-09-27 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * ido.el (ido-read-internal): Accept cons cell HIST arg. | ||
| 4 | |||
| 1 | 2011-09-25 Michael Albinus <michael.albinus@gmx.de> | 5 | 2011-09-25 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 6 | ||
| 3 | * net/dbus.el (dbus-unregister-object): Don't release services for | 7 | * net/dbus.el (dbus-unregister-object): Don't release services for |
diff --git a/lisp/ido.el b/lisp/ido.el index 4086000e3e9..46ac5784d0e 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -1826,7 +1826,7 @@ This function also adds a hook to the minibuffer." | |||
| 1826 | ;; e.g. the file name may be ignored or joined with ido-current-directory, and | 1826 | ;; e.g. the file name may be ignored or joined with ido-current-directory, and |
| 1827 | ;; the relevant function is called (find-file, write-file, etc). | 1827 | ;; the relevant function is called (find-file, write-file, etc). |
| 1828 | 1828 | ||
| 1829 | (defun ido-read-internal (item prompt history &optional default require-match initial) | 1829 | (defun ido-read-internal (item prompt hist &optional default require-match initial) |
| 1830 | "Perform the `ido-read-buffer' and `ido-read-file-name' functions. | 1830 | "Perform the `ido-read-buffer' and `ido-read-file-name' functions. |
| 1831 | Return the name of a buffer or file selected. | 1831 | Return the name of a buffer or file selected. |
| 1832 | PROMPT is the prompt to give to the user. | 1832 | PROMPT is the prompt to give to the user. |
| @@ -1984,7 +1984,7 @@ If INITIAL is non-nil, it specifies the initial input string." | |||
| 1984 | (read-from-minibuffer (ido-make-prompt item prompt) | 1984 | (read-from-minibuffer (ido-make-prompt item prompt) |
| 1985 | (prog1 ido-text-init | 1985 | (prog1 ido-text-init |
| 1986 | (setq ido-text-init nil)) | 1986 | (setq ido-text-init nil)) |
| 1987 | ido-completion-map nil history)))) | 1987 | ido-completion-map nil hist)))) |
| 1988 | (ido-trace "read-from-minibuffer" ido-final-text) | 1988 | (ido-trace "read-from-minibuffer" ido-final-text) |
| 1989 | (if (get-buffer ido-completion-buffer) | 1989 | (if (get-buffer ido-completion-buffer) |
| 1990 | (kill-buffer ido-completion-buffer)) | 1990 | (kill-buffer ido-completion-buffer)) |
| @@ -2155,7 +2155,12 @@ If INITIAL is non-nil, it specifies the initial input string." | |||
| 2155 | 2155 | ||
| 2156 | (t | 2156 | (t |
| 2157 | (setq done t)))))) | 2157 | (setq done t)))))) |
| 2158 | (add-to-history (or history 'minibuffer-history) ido-selected) | 2158 | (add-to-history (cond |
| 2159 | ((consp hist) | ||
| 2160 | (or (car hist) 'minibuffer-history)) | ||
| 2161 | (hist hist) | ||
| 2162 | (t 'minibuffer-history)) | ||
| 2163 | ido-selected) | ||
| 2159 | ido-selected)) | 2164 | ido-selected)) |
| 2160 | 2165 | ||
| 2161 | (defun ido-edit-input () | 2166 | (defun ido-edit-input () |