From: Augusto Stoffel Date: Wed, 17 Apr 2024 18:26:16 +0000 (+0200) Subject: With glasses-uncapitalize-p, use a display overlay property X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c0adbf291ec45c1e7bac617b1200e1e48fd0ea80;p=emacs.git 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) (cherry picked from commit c99a1bb1cfc758d3ba78581b72ef8412ee258f76) --- diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index 92de2a2581f..18ab4911c89 100644 --- a/lisp/progmodes/glasses.el +++ b/lisp/progmodes/glasses.el @@ -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 "")))