all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#51606: 29.0.50; [PATCH] Show offscreen context with properties
@ 2021-11-05  9:40 Arash Esbati
  2021-11-05 12:02 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Arash Esbati @ 2021-11-05  9:40 UTC (permalink / raw)
  To: 51606

Hi all,

paren.el now can show the context in minibuffer when
`show-paren-context-when-offscreen' is non-nil (introduced in this
change 9f505c476e).  Is it possible to extend this that text properties
are not stripped?  I'm thinking about something like this:

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/paren.el b/lisp/paren.el
index 7e7cf6c262..d0330f2f6a 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -96,6 +96,14 @@ show-paren-context-when-offscreen
   :type 'boolean
   :version "29.1")

+(defcustom show-paren-context-when-offscreen-with-properties nil
+  "If non-nil, show the offscreen context in the echo area with properties.
+It is complementary to `show-paren-context-when-offscreen' and is
+taken into account when `show-paren-context-when-offscreen' is
+non-nil."
+  :type 'boolean
+  :version "29.1")
+
 (defvar show-paren--idle-timer nil)
 (defvar show-paren--overlay
   (let ((ol (make-overlay (point) (point) nil t))) (delete-overlay ol) ol)
@@ -332,7 +340,9 @@ show-paren-function
                       (message-log-max nil))
                   (minibuffer-message
                    "Matches %s"
-                   (substring-no-properties open-paren-line-string)))))
+                   (if show-paren-context-when-offscreen-with-properties
+                       open-paren-line-string
+                     (substring-no-properties open-paren-line-string))))))
           ;; Always set the overlay face, since it varies.
           (overlay-put show-paren--overlay 'priority show-paren-priority)
           (overlay-put show-paren--overlay 'face face))))))
--8<---------------cut here---------------end--------------->8---

Any comments welcome.  I will prepare a proper format-patch (incl. update of
programs.texi) once this is accepted.

Best, Arash





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

end of thread, other threads:[~2022-01-15 13:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-05  9:40 bug#51606: 29.0.50; [PATCH] Show offscreen context with properties Arash Esbati
2021-11-05 12:02 ` Eli Zaretskii
2021-11-05 12:57   ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-05 14:01     ` Eli Zaretskii
2021-11-26 19:01       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-29 11:03         ` Arash Esbati
2022-01-15 13:16           ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.