diff options
| author | Stefan Monnier | 2012-04-30 20:21:23 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-04-30 20:21:23 -0400 |
| commit | 6eac8dc9ac4a6478b88a397a876c272b16c0facc (patch) | |
| tree | 0aa19deca455854cd8e7eec6bfeaf73b747717c0 /lisp | |
| parent | 4d5c63499ad91b69ffd08bcfbc248bd66a2d8641 (diff) | |
| download | emacs-6eac8dc9ac4a6478b88a397a876c272b16c0facc.tar.gz emacs-6eac8dc9ac4a6478b88a397a876c272b16c0facc.zip | |
* lisp/minibuffer.el (completion-table-with-quoting): Fix compatibility
all-completions code to not return a number in the last cdr.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 19 |
2 files changed, 20 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8e826aa69fa..7919a9607c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * minibuffer.el (completion-table-with-quoting): Fix compatibility | ||
| 4 | all-completions code to not return a number in the last cdr. | ||
| 5 | |||
| 1 | 2012-04-30 Leo Liu <sdl.web@gmail.com> | 6 | 2012-04-30 Leo Liu <sdl.web@gmail.com> |
| 2 | 7 | ||
| 3 | * ibuf-ext.el (ibuffer-diff-buffer-with-file-1): Avoid buffer | 8 | * ibuf-ext.el (ibuffer-diff-buffer-with-file-1): Avoid buffer |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 59bd0d231dc..1d459b0db62 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -420,6 +420,13 @@ for use at QPOS." | |||
| 420 | (length string)))))) | 420 | (length string)))))) |
| 421 | (list* 'boundaries qlboundary qrboundary))) | 421 | (list* 'boundaries qlboundary qrboundary))) |
| 422 | 422 | ||
| 423 | ;; In "normal" use a c-t-with-quoting completion table should never be | ||
| 424 | ;; called with action in (t nil) because `completion--unquote' should have | ||
| 425 | ;; been called before and would have returned a different completion table | ||
| 426 | ;; to apply to the unquoted text. But there's still a lot of code around | ||
| 427 | ;; that likes to use all/try-completions directly, so we do our best to | ||
| 428 | ;; handle those calls as well as we can. | ||
| 429 | |||
| 423 | ((eq action nil) ;;try-completion | 430 | ((eq action nil) ;;try-completion |
| 424 | (let* ((ustring (funcall unquote string)) | 431 | (let* ((ustring (funcall unquote string)) |
| 425 | (completion (try-completion ustring table pred))) | 432 | (completion (try-completion ustring table pred))) |
| @@ -447,10 +454,14 @@ for use at QPOS." | |||
| 447 | (pcase-let* | 454 | (pcase-let* |
| 448 | ((ustring (funcall unquote string)) | 455 | ((ustring (funcall unquote string)) |
| 449 | (completions (all-completions ustring table pred)) | 456 | (completions (all-completions ustring table pred)) |
| 450 | (boundary (car (completion-boundaries ustring table pred "")))) | 457 | (boundary (car (completion-boundaries ustring table pred ""))) |
| 451 | (completion--twq-all | 458 | (completions |
| 452 | string ustring completions boundary unquote requote))) | 459 | (completion--twq-all |
| 453 | 460 | string ustring completions boundary unquote requote)) | |
| 461 | (last (last completions))) | ||
| 462 | (when (consp last) (setcdr last nil)) | ||
| 463 | completions)) | ||
| 464 | |||
| 454 | ((eq action 'completion--unquote) | 465 | ((eq action 'completion--unquote) |
| 455 | (let ((ustring (funcall unquote string)) | 466 | (let ((ustring (funcall unquote string)) |
| 456 | (uprefix (funcall unquote (substring string 0 pred)))) | 467 | (uprefix (funcall unquote (substring string 0 pred)))) |