emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 16ac377aab2: Forward completion text properties in 'completion-ta


From: Jim Porter
Subject: master 16ac377aab2: Forward completion text properties in 'completion-table-with-quoting'
Date: Sun, 19 Nov 2023 18:15:27 -0500 (EST)

branch: master
commit 16ac377aab257d635918dd0188dcdf630e75757c
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>

    Forward completion text properties in 'completion-table-with-quoting'
    
    This fixes an issue with 'pcomplete-here-using-help', which passes
    annotation strings along as text properties.  Previously, those got
    clobbered when the completions got requoted (bug#67112).
    
    * lisp/minibuffer.el (completion--twq-all): Apply text properties from
    the first character of the unquoted completion to the quoted
    completion.
---
 lisp/minibuffer.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 7af7a359674..5c12d9fc914 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -677,6 +677,13 @@ for use at QPOS."
                                              'completions-common-part)
                                qprefix))))
                         (qcompletion (concat qprefix qnew)))
+                   ;; Some completion tables (including this one) pass
+                   ;; along necessary information as text properties
+                   ;; on the first character of the completion.  Make
+                   ;; sure the quoted completion has these properties
+                   ;; too.
+                   (add-text-properties 0 1 (text-properties-at 0 completion)
+                                        qcompletion)
                    ;; Attach unquoted completion string, which is needed
                    ;; to score the completion in `completion--flex-score'.
                    (put-text-property 0 1 'completion--unquoted



reply via email to

[Prev in Thread] Current Thread [Next in Thread]