With glasses-uncapitalize-p, use a display overlay property

* lisp/progmodes/glasses.el (glasses-make-readable): Use the
'display' property instead of 'after-string', so that one is
able to place the cursor on the uncapitalized character.
(Bug#70441)
This commit is contained in:
Augusto Stoffel 2024-04-17 20:26:16 +02:00 committed by Eli Zaretskii
parent 3af9c33263
commit c99a1bb1cf

View file

@ -232,8 +232,7 @@ CATEGORY is the overlay category. If it is nil, use the `glasses' category."
(save-match-data
(re-search-backward "\\<.")
(looking-at glasses-uncapitalize-regexp))))
(overlay-put o 'invisible t)
(overlay-put o 'after-string (downcase (match-string n))))))
(overlay-put o 'display (downcase (match-string n))))))
;; Separator change
(when (and (not (string= glasses-original-separator glasses-separator))
(not (string= glasses-original-separator "")))