mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-21 22:34:51 -07:00
; 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 f4a1c00656. See also bug#80593.
This commit is contained in:
parent
e4aa9cfbab
commit
72c262d5d1
1 changed files with 7 additions and 5 deletions
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue