From 70c06e3955a2970576310a8aa05f483564f622aa Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 15 Aug 2002 11:28:50 +0000 Subject: [PATCH] (reftex-mode): Moved creation of special syntax tables to top-level. --- lisp/textmodes/reftex.el | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 0ccaff9ead1..3d469d55bc6 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -314,6 +314,19 @@ (defvar reftex-syntax-table nil) (defvar reftex-syntax-table-for-bib nil) +;; Prepare the special syntax tables. +(unless reftex-syntax-table + (setq reftex-syntax-table (copy-syntax-table (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 reftex-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)) + (defvar reftex-auto-view-crossref-timer nil "The timer used for auto-view-crossref.") @@ -368,16 +381,6 @@ on the menu bar. (and reftex-auto-view-crossref (reftex-toggle-auto-view-crossref)) (put 'reftex-auto-view-crossref 'initialized t)) - (unless reftex-syntax-table - (setq reftex-syntax-table (copy-syntax-table (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 reftex-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)) (run-hooks 'reftex-mode-hook)) ;; Mode was turned off (easy-menu-remove reftex-mode-menu))) -- 2.39.5