From: Juanma Barranquero <lekktu@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 14595@debbugs.gnu.org
Subject: bug#14595: Erroneous composition of lambda in emacs-lisp buffers with prog-prettify-symbols enabled
Date: Sat, 15 Jun 2013 22:51:35 +0200 [thread overview]
Message-ID: <CAAeL0SSyLi+m3r8o8OW88A=1qSVJXMOuB3oBgcTypDiypGgqzA@mail.gmail.com> (raw)
In-Reply-To: <CAAeL0SQPxEAXi=xk8wiJ=OEfo2CQAyv_1Fhz=QSDRieos3NEuw@mail.gmail.com>
On Sat, Jun 15, 2013 at 7:49 PM, Juanma Barranquero <lekktu@gmail.com> wrote:
> In other words, this simple patch fixes the problem:
This one is presumably cheaper:
=== modified file 'lisp/progmodes/prog-mode.el'
--- lisp/progmodes/prog-mode.el 2013-06-06 21:32:13 +0000
+++ lisp/progmodes/prog-mode.el 2013-06-15 20:50:09 +0000
@@ -74,15 +74,17 @@
(let* ((start (match-beginning 0))
(end (match-end 0))
(syntaxes (if (eq (char-syntax (char-after start)) ?w)
- '(?w) '(?. ?\\))))
+ '(?w) '(?. ?\\)))
+ match)
(if (or (memq (char-syntax (or (char-before start) ?\ )) syntaxes)
(memq (char-syntax (or (char-after end) ?\ )) syntaxes)
- (nth 8 (syntax-ppss)))
+ ;; syntax-ppss can modify the match data
+ (progn (setq match (match-string 0)) (nth 8 (syntax-ppss))))
;; No composition for you. Let's actually remove any composition
;; we may have added earlier and which is now incorrect.
(remove-text-properties start end '(composition))
;; That's a symbol alright, so add the composition.
- (compose-region start end (cdr (assoc (match-string 0) alist)))))
+ (compose-region start end (cdr (assoc match alist)))))
;; Return nil because we're not adding any face property.
nil)
next prev parent reply other threads:[~2013-06-15 20:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 3:18 bug#14595: Erroneous composition of lambda in emacs-lisp buffers with prog-prettify-symbols enabled Juanma Barranquero
2013-06-15 8:21 ` Ted Zlatanov
2013-06-15 9:00 ` Eli Zaretskii
2013-06-15 9:12 ` Eli Zaretskii
2013-06-15 17:35 ` Juanma Barranquero
2013-06-15 17:49 ` Juanma Barranquero
2013-06-15 20:51 ` Juanma Barranquero [this message]
2013-06-16 0:13 ` Ted Zlatanov
2013-06-16 0:53 ` Stefan Monnier
2013-06-16 1:19 ` Juanma Barranquero
2013-06-16 1:32 ` Juanma Barranquero
2013-06-16 0:17 ` Ted Zlatanov
2013-06-16 2:50 ` Eli Zaretskii
2013-06-16 3:01 ` Juanma Barranquero
2013-06-16 9:27 ` Ted Zlatanov
2013-06-16 16:17 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAeL0SSyLi+m3r8o8OW88A=1qSVJXMOuB3oBgcTypDiypGgqzA@mail.gmail.com' \
--to=lekktu@gmail.com \
--cc=14595@debbugs.gnu.org \
--cc=eliz@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 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.