* Hiding the braces when org-pretty-entities is enabled
@ 2012-05-04 22:24 Mark E. Shoulson
2012-05-05 6:08 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Mark E. Shoulson @ 2012-05-04 22:24 UTC (permalink / raw)
To: org-mode mailing list
[-- Attachment #1: Type: text/html, Size: 1002 bytes --]
[-- Attachment #2: 0001-Entities-when-org-pretty-entities-is-on-the-terminat.patch --]
[-- Type: text/x-patch, Size: 1312 bytes --]
From 819e66254de18ae78e96b52dee1b5098920c3e31 Mon Sep 17 00:00:00 2001
From: Mark Shoulson <mark@kli.org>
Date: Fri, 4 May 2012 18:19:06 -0400
Subject: [PATCH] Entities: when org-pretty-entities is on, the {} terminating
entities is also hidden
---
lisp/org.el | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 8776664..65dc1ce 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5938,16 +5938,19 @@ needs to be inserted at a specific position in the font-lock sequence.")
(when org-pretty-entities
(catch 'match
(while (re-search-forward
- "\\\\\\(frac[13][24]\\|[a-zA-Z]+\\)\\($\\|[^[:alpha:]\n]\\)"
+ "\\\\\\(frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:alpha:]\n]\\)"
limit t)
(if (and (not (org-in-indented-comment-line))
(setq ee (org-entity-get (match-string 1)))
(= (length (nth 6 ee)) 1))
- (progn
+ (let*
+ ((end (if (equal (match-string 2) "{}")
+ (match-end 2)
+ (match-end 1))))
(add-text-properties
- (match-beginning 0) (match-end 1)
+ (match-beginning 0) end
(list 'font-lock-fontified t))
- (compose-region (match-beginning 0) (match-end 1)
+ (compose-region (match-beginning 0) end
(nth 6 ee) nil)
(backward-char 1)
(throw 'match t))))
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Hiding the braces when org-pretty-entities is enabled
2012-05-04 22:24 Hiding the braces when org-pretty-entities is enabled Mark E. Shoulson
@ 2012-05-05 6:08 ` Bastien
0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2012-05-05 6:08 UTC (permalink / raw)
To: Mark E. Shoulson; +Cc: org-mode mailing list
Hi Mark,
"Mark E. Shoulson" <mark@kli.org> writes:
> It's a very tiny patch, but one that probably should have happened
> before.
Yes. Surprised nobody reported this already.
I applied the patch, but I had to add a ChangeLog myself. Please
provide it next time.
Thanks!
--
Bastien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-05 15:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-04 22:24 Hiding the braces when org-pretty-entities is enabled Mark E. Shoulson
2012-05-05 6:08 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.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).