[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 d63c9a9: * lisp/minibuffer.el: Install a workarou
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs-26 d63c9a9: * lisp/minibuffer.el: Install a workaround for bug#16274 |
Date: |
Sat, 11 Nov 2017 10:25:27 -0500 (EST) |
branch: emacs-26
commit d63c9a96f51fd4d723dc66a6cc0a8a0a04c8ce6c
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* lisp/minibuffer.el: Install a workaround for bug#16274
* lisp/minibuffer.el (completion--nth-completion): Avoid signaling an
error when `md` is applied to another table.
---
lisp/minibuffer.el | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 26861de..a4a8f5c 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -896,8 +896,15 @@ This overrides the defaults specified in
`completion-category-defaults'."
;; than from completion-extra-properties) because it may apply only to some
;; part of the string (e.g. substitute-in-file-name).
(let ((requote
- (when (completion-metadata-get metadata 'completion--unquote-requote)
- (cl-assert (functionp table))
+ (when (and
+ (completion-metadata-get metadata 'completion--unquote-requote)
+ ;; Sometimes a table's metadata is used on another
+ ;; table (typically that other table is just a list taken
+ ;; from the output of `all-completions' or something
equivalent,
+ ;; for progressive refinement). See bug#28898 and bug#16274.
+ ;; FIXME: Rather than do nothing, we should somehow call
+ ;; the original table, in that case!
+ (functionp table))
(let ((new (funcall table string point 'completion--unquote)))
(setq string (pop new))
(setq table (pop new))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 d63c9a9: * lisp/minibuffer.el: Install a workaround for bug#16274,
Stefan Monnier <=