]> git.eshelyaron.com Git - emacs.git/commitdiff
With glasses-uncapitalize-p, use a display overlay property
authorAugusto Stoffel <arstoffel@gmail.com>
Wed, 17 Apr 2024 18:26:16 +0000 (20:26 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 20 Apr 2024 11:11:23 +0000 (14:11 +0300)
* 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)

(cherry picked from commit c99a1bb1cfc758d3ba78581b72ef8412ee258f76)

lisp/progmodes/glasses.el

index 92de2a2581fc498f8eead7d87bfd142da7a5e35e..18ab4911c89c51f7c0c37242b60335789a8503f4 100644 (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 "")))