monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 0ca09e7a7a575c0485b18cb41b7dcccaf6527252
Author: Leo Liu <[email protected]>
Date: Sun Sep 5 15:49:16 2010 +0100
Fix a bug in font-latex-add-to-syntax-alist.
* font-latex.el (font-latex-add-to-syntax-alist): Fix a bug in
`font-latex-add-to-syntax-alist' where it modified both the buffer
local and global value of `font-latex-syntax-alist'.
---
ChangeLog | 4 ++++
font-latex.el | 3 ++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ce0f36a..cc198d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,10 @@
* tex.el (TeX-math-input-method-off-regexp): Improve and fix typo.
See bug http://permalink.gmane.org/gmane.emacs.auctex.devel/2468.
+ * font-latex.el (font-latex-add-to-syntax-alist): Fix a bug in
+ `font-latex-add-to-syntax-alist' where it modified both the buffer
+ local and global value of `font-latex-syntax-alist'.
+
2013-04-08 Tassilo Horn <[email protected]>
* latex.el (LaTeX-style-list): Correct docstring.
diff --git a/font-latex.el b/font-latex.el
index 62aae93..ba3d79a 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1125,7 +1125,8 @@ end up in `font-lock-defaults'. Each entry in LIST
should be a
cons pair as expected by `font-lock-defaults'. The function also
triggers Font Lock to recognize the change."
(make-local-variable 'font-latex-syntax-alist)
- (nconc font-latex-syntax-alist list)
+ (set (make-local-variable 'font-latex-syntax-alist)
+ (append font-latex-syntax-alist list))
;; FIXME: Are there situations where we need to alter `font-lock-defaults'
;; directly?
;; (dolist (entry list)