aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2017-11-11 10:25:20 -0500
committerStefan Monnier2017-11-11 10:25:20 -0500
commitd63c9a96f51fd4d723dc66a6cc0a8a0a04c8ce6c (patch)
tree411462f806a0c3fe5ac5d2b7a437e5ea64892bd9
parent7657a867095f9edbb43c22f979f06dbe880059b7 (diff)
downloademacs-d63c9a96f51fd4d723dc66a6cc0a8a0a04c8ce6c.tar.gz
emacs-d63c9a96f51fd4d723dc66a6cc0a8a0a04c8ce6c.zip
* 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.
-rw-r--r--lisp/minibuffer.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 26861de87b0..a4a8f5cb282 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -896,8 +896,15 @@ This overrides the defaults specified in `completion-category-defaults'."
896 ;; than from completion-extra-properties) because it may apply only to some 896 ;; than from completion-extra-properties) because it may apply only to some
897 ;; part of the string (e.g. substitute-in-file-name). 897 ;; part of the string (e.g. substitute-in-file-name).
898 (let ((requote 898 (let ((requote
899 (when (completion-metadata-get metadata 'completion--unquote-requote) 899 (when (and
900 (cl-assert (functionp table)) 900 (completion-metadata-get metadata 'completion--unquote-requote)
901 ;; Sometimes a table's metadata is used on another
902 ;; table (typically that other table is just a list taken
903 ;; from the output of `all-completions' or something equivalent,
904 ;; for progressive refinement). See bug#28898 and bug#16274.
905 ;; FIXME: Rather than do nothing, we should somehow call
906 ;; the original table, in that case!
907 (functionp table))
901 (let ((new (funcall table string point 'completion--unquote))) 908 (let ((new (funcall table string point 'completion--unquote)))
902 (setq string (pop new)) 909 (setq string (pop new))
903 (setq table (pop new)) 910 (setq table (pop new))