[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113004: * lisp/progmodes/prog-mode.el: Fix bug#1459
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] trunk r113004: * lisp/progmodes/prog-mode.el: Fix bug#14595. |
Date: |
Sun, 16 Jun 2013 01:26:57 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113004
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/14595
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Sun 2013-06-16 03:26:42 +0200
message:
* lisp/progmodes/prog-mode.el: Fix bug#14595.
(prog--prettify-font-lock-compose-symbol): Save relevant match data
before calling `syntax-ppss'.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/prog-mode.el progmode.el-20091230193750-bspzfk1gt8nm2mal-14
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-06-15 22:44:38 +0000
+++ b/lisp/ChangeLog 2013-06-16 01:26:42 +0000
@@ -1,3 +1,8 @@
+2013-06-16 Juanma Barranquero <address@hidden>
+
+ * progmodes/prog-mode.el (prog--prettify-font-lock-compose-symbol):
+ Save relevant match data before calling `syntax-ppss' (bug#14595).
+
2013-06-15 Juri Linkov <address@hidden>
* files-x.el (modify-file-local-variable-prop-line): Add local
=== modified file 'lisp/progmodes/prog-mode.el'
--- a/lisp/progmodes/prog-mode.el 2013-06-06 21:32:13 +0000
+++ b/lisp/progmodes/prog-mode.el 2013-06-16 01:26:42 +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 could modify the match data (bug#14595)
+ (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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113004: * lisp/progmodes/prog-mode.el: Fix bug#14595.,
Juanma Barranquero <=