unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#70441: [PATCH] With glasses-uncapitalize-p, use a display overlay property
@ 2024-04-17 18:29 Augusto Stoffel
  2024-04-17 19:16 ` Eli Zaretskii
  2024-04-20  8:31 ` Eli Zaretskii
  0 siblings, 2 replies; 4+ messages in thread
From: Augusto Stoffel @ 2024-04-17 18:29 UTC (permalink / raw)
  To: 70441

[-- 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#70441: [PATCH] With glasses-uncapitalize-p, use a display overlay property
  2024-04-17 18:29 bug#70441: [PATCH] With glasses-uncapitalize-p, use a display overlay property Augusto Stoffel
@ 2024-04-17 19:16 ` Eli Zaretskii
  2024-04-17 19:41   ` Augusto Stoffel
  2024-04-20  8:31 ` Eli Zaretskii
  1 sibling, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2024-04-17 19:16 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: 70441

> From: Augusto Stoffel <arstoffel@gmail.com>
> Date: Wed, 17 Apr 2024 20:29:56 +0200
> 
> >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.

Is this possible with the 'cursor' overlay property as well?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#70441: [PATCH] With glasses-uncapitalize-p, use a display overlay property
  2024-04-17 19:16 ` Eli Zaretskii
@ 2024-04-17 19:41   ` Augusto Stoffel
  0 siblings, 0 replies; 4+ messages in thread
From: Augusto Stoffel @ 2024-04-17 19:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 70441

On Wed, 17 Apr 2024 at 22:16, Eli Zaretskii wrote:

>> From: Augusto Stoffel <arstoffel@gmail.com>
>> Date: Wed, 17 Apr 2024 20:29:56 +0200
>> 
>> >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.
>
> Is this possible with the 'cursor' overlay property as well?

I've just checked and I don't think the cursor property can help here.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#70441: [PATCH] With glasses-uncapitalize-p, use a display overlay property
  2024-04-17 18:29 bug#70441: [PATCH] With glasses-uncapitalize-p, use a display overlay property Augusto Stoffel
  2024-04-17 19:16 ` Eli Zaretskii
@ 2024-04-20  8:31 ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2024-04-20  8:31 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: 70441-done

> From: Augusto Stoffel <arstoffel@gmail.com>
> Date: Wed, 17 Apr 2024 20:29:56 +0200
> 
> >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.

Thanks, installed on master, and closing the bug.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-20  8:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-17 18:29 bug#70441: [PATCH] With glasses-uncapitalize-p, use a display overlay property Augusto Stoffel
2024-04-17 19:16 ` Eli Zaretskii
2024-04-17 19:41   ` Augusto Stoffel
2024-04-20  8:31 ` Eli Zaretskii

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).