aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2023-05-29 20:34:53 +0300
committerJuri Linkov2023-05-29 20:34:53 +0300
commit500abc4dc3792d9f5e1bfdbb5e493c8a59889097 (patch)
tree9d88db5615710b9e2839d653112a0dd7992b9da9
parentafc1f329356da167902d86b610023a32943f6cee (diff)
downloademacs-500abc4dc3792d9f5e1bfdbb5e493c8a59889097.tar.gz
emacs-500abc4dc3792d9f5e1bfdbb5e493c8a59889097.zip
* 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.
-rw-r--r--lisp/tmm.el3
1 files changed, 2 insertions, 1 deletions
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'."
329 (with-current-buffer standard-output 329 (with-current-buffer standard-output
330 (goto-char (point-min)) 330 (goto-char (point-min))
331 (let* (;; First candidate: first string with mouse-face 331 (let* (;; First candidate: first string with mouse-face
332 (menu-start-1 (next-single-char-property-change (point) 'mouse-face)) 332 (menu-start-1 (or (and (get-text-property (point) 'mouse-face) (point))
333 (next-single-char-property-change (point) 'mouse-face)))
333 ;; Second candidate: an inactive menu item with tmm-inactive face 334 ;; Second candidate: an inactive menu item with tmm-inactive face
334 (tps-result (save-excursion 335 (tps-result (save-excursion
335 (text-property-search-forward 'face 'tmm-inactive t))) 336 (text-property-search-forward 'face 'tmm-inactive t)))