]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug when completing file names scratch/a-modest-completion-redesign-proposal
authorJoão Távora <joaotavora@gmail.com>
Sun, 10 Nov 2019 23:01:46 +0000 (23:01 +0000)
committerJoão Távora <joaotavora@gmail.com>
Sun, 10 Nov 2019 23:01:46 +0000 (23:01 +0000)
* lisp/minibuffer.el (completion--nth-completion): Fix bug when
requote function is needed.

lisp/minibuffer.el

index 08b230d575293a68dd4fe2f80e9a7ebfd1aa1103..fce705cd01414cd2e0c4d7de43557fe90e123be7 100644 (file)
@@ -958,9 +958,9 @@ N can be 1 for to mean \"completion-try-completion\" or 2 to mean
                                  (_ n))
                                style string table pred point)))
            (completion--styles md))))
-    (if requote
-        (funcall requote result n)
-      result)))
+    (when requote
+      (setcar result (funcall requote (car result) n)))
+    result))
 
 (defun completion-try-completion (string table pred point &optional metadata)
   "Try to complete STRING using completion table TABLE.