From 72c262d5d12def2ff9ba67aa489babcb6583f20e Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Thu, 19 Mar 2026 17:19:18 +0100 Subject: [PATCH] ; Adapt 'elisp-fontify-symbol' to 'cursor-sensor-mode' changes * lisp/progmodes/elisp-mode.el (elisp-fontify-symbol): Mark the 'cursor-sensor-functions' property as 'rear-nonsticky', to adapt to 'cursor-sensor-mode' taking into account property stickiness since f4a1c006569. See also bug#80593. --- lisp/progmodes/elisp-mode.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 83eb9254da1..5bddec242af 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -620,11 +620,13 @@ non-nil, also annotate the symbol with `cursor-sensor-functions'." (elisp--annotate-symbol-with-help-echo role beg end sym) (put-text-property beg end 'mouse-face `(,face elisp-symbol-at-mouse))) (when (and id (bound-and-true-p cursor-sensor-mode)) - (put-text-property beg (1+ end) 'cursor-sensor-functions - ;; Get a fresh list with SYM hardcoded, - ;; so that the value is distinguishable - ;; from the value in adjacent regions. - (elisp-cursor-sensor beg)))))) + (add-text-properties beg (1+ end) + `(cursor-sensor-functions + ;; Get a fresh list with BEG hardcoded, + ;; so that the value is distinguishable + ;; from the value in adjacent regions. + ,(elisp-cursor-sensor beg) + rear-nonsticky (cursor-sensor-functions))))))) (defun elisp-fontify-symbols (end) "Fontify symbols from point to END according to their role in the code."