diff options
| author | Eshel Yaron | 2026-03-19 17:19:18 +0100 |
|---|---|---|
| committer | Eshel Yaron | 2026-03-19 17:29:27 +0100 |
| commit | 72c262d5d12def2ff9ba67aa489babcb6583f20e (patch) | |
| tree | 5224a2fc7732583e48cf268632a704f93e439e6f /lisp | |
| parent | e4aa9cfbabeced8a8c37bc9cadd7b0ed0ed3bfea (diff) | |
| download | emacs-72c262d5d12def2ff9ba67aa489babcb6583f20e.tar.gz emacs-72c262d5d12def2ff9ba67aa489babcb6583f20e.zip | |
; 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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/progmodes/elisp-mode.el | 12 |
1 files 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'." | |||
| 620 | (elisp--annotate-symbol-with-help-echo role beg end sym) | 620 | (elisp--annotate-symbol-with-help-echo role beg end sym) |
| 621 | (put-text-property beg end 'mouse-face `(,face elisp-symbol-at-mouse))) | 621 | (put-text-property beg end 'mouse-face `(,face elisp-symbol-at-mouse))) |
| 622 | (when (and id (bound-and-true-p cursor-sensor-mode)) | 622 | (when (and id (bound-and-true-p cursor-sensor-mode)) |
| 623 | (put-text-property beg (1+ end) 'cursor-sensor-functions | 623 | (add-text-properties beg (1+ end) |
| 624 | ;; Get a fresh list with SYM hardcoded, | 624 | `(cursor-sensor-functions |
| 625 | ;; so that the value is distinguishable | 625 | ;; Get a fresh list with BEG hardcoded, |
| 626 | ;; from the value in adjacent regions. | 626 | ;; so that the value is distinguishable |
| 627 | (elisp-cursor-sensor beg)))))) | 627 | ;; from the value in adjacent regions. |
| 628 | ,(elisp-cursor-sensor beg) | ||
| 629 | rear-nonsticky (cursor-sensor-functions))))))) | ||
| 628 | 630 | ||
| 629 | (defun elisp-fontify-symbols (end) | 631 | (defun elisp-fontify-symbols (end) |
| 630 | "Fontify symbols from point to END according to their role in the code." | 632 | "Fontify symbols from point to END according to their role in the code." |