+2015-01-28 Tassilo Horn <tsdh@gnu.org>
+
+ * 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 <fgallina@gnu.org>
python.el: New non-global state dependent indentation engine.
(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.
(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