emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 500abc4dc37: * lisp/tmm.el (tmm-completion-delete-prompt): Add


From: Juri Linkov
Subject: emacs-29 500abc4dc37: * lisp/tmm.el (tmm-completion-delete-prompt): Add more checks (bug#63754).
Date: Mon, 29 May 2023 13:35:32 -0400 (EDT)

branch: emacs-29
commit 500abc4dc3792d9f5e1bfdbb5e493c8a59889097
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/tmm.el (tmm-completion-delete-prompt): Add more checks (bug#63754).
    
    In case when 'completions-header-format' is nil, the first 'mouse-face'
    property is at the beginning of the buffer.  So first use 
'get-text-property'
    at point-min.
---
 lisp/tmm.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/tmm.el b/lisp/tmm.el
index 88254f0d1b8..a4058594622 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -329,7 +329,8 @@ Stores a list of all the shortcuts in the free variable 
`tmm-short-cuts'."
   (with-current-buffer standard-output
     (goto-char (point-min))
     (let* (;; First candidate: first string with mouse-face
-           (menu-start-1 (next-single-char-property-change (point) 
'mouse-face))
+           (menu-start-1 (or (and (get-text-property (point) 'mouse-face) 
(point))
+                             (next-single-char-property-change (point) 
'mouse-face)))
            ;; Second candidate: an inactive menu item with tmm-inactive face
            (tps-result (save-excursion
                          (text-property-search-forward 'face 'tmm-inactive t)))



reply via email to

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