[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 8a8bd38: Fix issues with BibTeX entries containing
From: |
Tassilo Horn |
Subject: |
[Emacs-diffs] master 8a8bd38: Fix issues with BibTeX entries containing ")". |
Date: |
Wed, 28 Jan 2015 09:36:53 +0000 |
branch: master
commit 8a8bd38fedb89b2d04cca2419698813a22862c3b
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
Fix issues with BibTeX entries containing ")".
* textmodes/reftex.el (reftex-syntax-table-for-bib): Give ( and )
punctuation syntax since to allow bibtex fields with values such
as {Test 1) and 2)} (bug#19205, bug#19707).
(reftex--prepare-syntax-tables): New function.
(reftex-mode): Use it.
---
lisp/ChangeLog | 8 ++++++++
lisp/textmodes/reftex.el | 22 +++++++++-------------
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index eb6ef6b..90681c8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
+2015-01-28 Tassilo Horn <address@hidden>
+
+ * textmodes/reftex.el (reftex-syntax-table-for-bib): Give ( and )
+ punctuation syntax since to allow bibtex fields with values such
+ as {Test 1) and 2)} (bug#19205, bug#19707).
+ (reftex--prepare-syntax-tables): New function.
+ (reftex-mode): Use it.
+
2015-01-26 Fabián Ezequiel Gallina <address@hidden>
python.el: New non-global state dependent indentation engine.
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 160d9fb..7cf54c6 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -106,17 +106,21 @@
(defvar reftex-syntax-table nil)
(defvar reftex-syntax-table-for-bib nil)
-(unless reftex-syntax-table
+(defun reftex--prepare-syntax-tables ()
(setq reftex-syntax-table (copy-syntax-table))
(modify-syntax-entry ?\( "." reftex-syntax-table)
- (modify-syntax-entry ?\) "." reftex-syntax-table))
+ (modify-syntax-entry ?\) "." reftex-syntax-table)
-(unless reftex-syntax-table-for-bib
(setq reftex-syntax-table-for-bib (copy-syntax-table))
(modify-syntax-entry ?\' "." reftex-syntax-table-for-bib)
(modify-syntax-entry ?\" "." reftex-syntax-table-for-bib)
(modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib)
- (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib))
+ (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib)
+ (modify-syntax-entry ?\( "." reftex-syntax-table-for-bib)
+ (modify-syntax-entry ?\) "." reftex-syntax-table-for-bib))
+
+(unless (and reftex-syntax-table reftex-syntax-table-for-bib)
+ (reftex--prepare-syntax-tables))
;; The following definitions are out of place, but I need them here
;; to make the compilation of reftex-mode not complain.
@@ -180,15 +184,7 @@ on the menu bar.
(put 'reftex-auto-recenter-toc 'initialized t))
;; Prepare the special syntax tables.
- (setq reftex-syntax-table (copy-syntax-table (syntax-table)))
- (modify-syntax-entry ?\( "." reftex-syntax-table)
- (modify-syntax-entry ?\) "." reftex-syntax-table)
-
- (setq reftex-syntax-table-for-bib (copy-syntax-table))
- (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib)
- (modify-syntax-entry ?\" "." reftex-syntax-table-for-bib)
- (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib)
- (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib)
+ (reftex--prepare-syntax-tables)
(run-hooks 'reftex-mode-hook))
;; Mode was turned off
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 8a8bd38: Fix issues with BibTeX entries containing ")".,
Tassilo Horn <=