diff options
| author | Stefan Monnier | 2012-10-19 14:59:36 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-10-19 14:59:36 -0400 |
| commit | 8e8083185c417eedbaadf0b33c7089da72fe2250 (patch) | |
| tree | ec9734b1c89f815edb11914aaee81e168aceb7d8 | |
| parent | 2c43889e841d1c4e19d876ec2c7d078b940d10d0 (diff) | |
| download | emacs-8e8083185c417eedbaadf0b33c7089da72fe2250.tar.gz emacs-8e8083185c417eedbaadf0b33c7089da72fe2250.zip | |
* lisp/minibuffer.el (minibuffer-force-complete): Make the next completion use
the same completion-field (bug@12221).
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 19 |
2 files changed, 22 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f9d9ad4b03d..096e9a52916 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * minibuffer.el (minibuffer-force-complete): Make the next completion use | ||
| 4 | the same completion-field (bug@12221). | ||
| 5 | |||
| 1 | 2012-10-19 Martin Rudalics <rudalics@gmx.at> | 6 | 2012-10-19 Martin Rudalics <rudalics@gmx.at> |
| 2 | 7 | ||
| 3 | * emacs-lisp/debug.el (debug): Record height of debugger window | 8 | * emacs-lisp/debug.el (debug): Record height of debugger window |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index f464b42182d..f865a0269d4 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1134,7 +1134,23 @@ Repeated uses step through the possible completions." | |||
| 1134 | ;; through the previous possible completions. | 1134 | ;; through the previous possible completions. |
| 1135 | (let ((last (last all))) | 1135 | (let ((last (last all))) |
| 1136 | (setcdr last (cons (car all) (cdr last))) | 1136 | (setcdr last (cons (car all) (cdr last))) |
| 1137 | (completion--cache-all-sorted-completions (cdr all))))))) | 1137 | (completion--cache-all-sorted-completions (cdr all))) |
| 1138 | ;; Make sure repeated uses cycle, even though completion--done might | ||
| 1139 | ;; have added a space or something that moved us outside of the field. | ||
| 1140 | ;; (bug#12221). | ||
| 1141 | (let* ((table minibuffer-completion-table) | ||
| 1142 | (pred minibuffer-completion-predicate) | ||
| 1143 | (extra-prop completion-extra-properties) | ||
| 1144 | (cmd | ||
| 1145 | (lambda () "Cycle through the possible completions." | ||
| 1146 | (interactive) | ||
| 1147 | (let ((completion-extra-properties extra-prop)) | ||
| 1148 | (completion-in-region start (point) table pred))))) | ||
| 1149 | (set-temporary-overlay-map | ||
| 1150 | (let ((map (make-sparse-keymap))) | ||
| 1151 | (define-key map [remap completion-at-point] cmd) | ||
| 1152 | (define-key map (vector last-command-event) cmd) | ||
| 1153 | map))))))) | ||
| 1138 | 1154 | ||
| 1139 | (defvar minibuffer-confirm-exit-commands | 1155 | (defvar minibuffer-confirm-exit-commands |
| 1140 | '(completion-at-point minibuffer-complete | 1156 | '(completion-at-point minibuffer-complete |
| @@ -1557,7 +1573,6 @@ variables.") | |||
| 1557 | (let* ((exit-fun (plist-get completion-extra-properties :exit-function)) | 1573 | (let* ((exit-fun (plist-get completion-extra-properties :exit-function)) |
| 1558 | (pre-msg (and exit-fun (current-message)))) | 1574 | (pre-msg (and exit-fun (current-message)))) |
| 1559 | (cl-assert (memq finished '(exact sole finished unknown))) | 1575 | (cl-assert (memq finished '(exact sole finished unknown))) |
| 1560 | ;; FIXME: exit-fun should receive `finished' as a parameter. | ||
| 1561 | (when exit-fun | 1576 | (when exit-fun |
| 1562 | (when (eq finished 'unknown) | 1577 | (when (eq finished 'unknown) |
| 1563 | (setq finished | 1578 | (setq finished |