diff options
| -rw-r--r-- | lisp/icomplete.el | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 6d77c0649ae..128fe6688bf 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -145,7 +145,7 @@ icompletion is occurring." | |||
| 145 | 145 | ||
| 146 | (defvar icomplete-minibuffer-map | 146 | (defvar icomplete-minibuffer-map |
| 147 | (let ((map (make-sparse-keymap))) | 147 | (let ((map (make-sparse-keymap))) |
| 148 | (define-key map [?\M-\t] 'minibuffer-force-complete) | 148 | (define-key map [?\M-\t] 'icomplete-force-complete) |
| 149 | (define-key map [?\C-j] 'icomplete-force-complete-and-exit) | 149 | (define-key map [?\C-j] 'icomplete-force-complete-and-exit) |
| 150 | (define-key map [?\C-.] 'icomplete-forward-completions) | 150 | (define-key map [?\C-.] 'icomplete-forward-completions) |
| 151 | (define-key map [?\C-,] 'icomplete-backward-completions) | 151 | (define-key map [?\C-,] 'icomplete-backward-completions) |
| @@ -162,6 +162,21 @@ the default otherwise." | |||
| 162 | (minibuffer-force-complete-and-exit) | 162 | (minibuffer-force-complete-and-exit) |
| 163 | (minibuffer-complete-and-exit))) | 163 | (minibuffer-complete-and-exit))) |
| 164 | 164 | ||
| 165 | (defun icomplete-force-complete () | ||
| 166 | "Complete the icomplete minibuffer." | ||
| 167 | (interactive) | ||
| 168 | (let ((retval (minibuffer-force-complete))) | ||
| 169 | ;; FIXME: What's this, you ask? To deal with a cycling corner | ||
| 170 | ;; case, `minibuffer-force-complete' will transiently replace the | ||
| 171 | ;; keybinding that this command was called with, but at least | ||
| 172 | ;; returns a function which we can call to disable that, since | ||
| 173 | ;; we're not at all interested in cycling here (bug#34077). | ||
| 174 | (when (and completion-cycling (functionp retval)) (funcall retval))) | ||
| 175 | ;; Again, since we're not interested in cycling, we don't want | ||
| 176 | ;; prospects to be recalculted from a cache of rotated completions. | ||
| 177 | (setq completion-cycling nil) | ||
| 178 | (setq completion-all-sorted-completions nil)) | ||
| 179 | |||
| 165 | (defun icomplete-forward-completions () | 180 | (defun icomplete-forward-completions () |
| 166 | "Step forward completions by one entry. | 181 | "Step forward completions by one entry. |
| 167 | Second entry becomes the first and can be selected with | 182 | Second entry becomes the first and can be selected with |