unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Augusto Stoffel <arstoffel@gmail.com>
To: 70441@debbugs.gnu.org
Subject: bug#70441: [PATCH] With glasses-uncapitalize-p, use a display overlay property
Date: Wed, 17 Apr 2024 20:29:56 +0200	[thread overview]
Message-ID: <87cyqnj10b.fsf@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 13 bytes --]

Tags: patch


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-With-glasses-uncapitalize-p-use-a-display-overlay-pr.patch --]
[-- Type: text/patch, Size: 1155 bytes --]

From 5c0e40abb970c2b638f765679d133b1ea307a68e Mon Sep 17 00:00:00 2001
From: Augusto Stoffel <arstoffel@gmail.com>
Date: Wed, 17 Apr 2024 20:26:16 +0200
Subject: [PATCH] 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.
---
 lisp/progmodes/glasses.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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 @@ glasses-make-readable
 			 (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 "")))
-- 
2.44.0


             reply	other threads:[~2024-04-17 18:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 18:29 Augusto Stoffel [this message]
2024-04-17 19:16 ` bug#70441: [PATCH] With glasses-uncapitalize-p, use a display overlay property Eli Zaretskii
2024-04-17 19:41   ` Augusto Stoffel
2024-04-20  8:31 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cyqnj10b.fsf@gmail.com \
    --to=arstoffel@gmail.com \
    --cc=70441@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).