aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes/reftex.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes/reftex.el')
-rw-r--r--lisp/textmodes/reftex.el24
1 files changed, 15 insertions, 9 deletions
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index bdee0fcf1d4..dfbeda38fd9 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -301,7 +301,9 @@ on the menu bar.
301 (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib) 301 (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib)
302 (modify-syntax-entry ?\" "." reftex-syntax-table-for-bib) 302 (modify-syntax-entry ?\" "." reftex-syntax-table-for-bib)
303 (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib) 303 (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib)
304 (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib)) 304 (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib)
305
306 (run-hooks 'reftex-mode-hook))
305 ;; Mode was turned off 307 ;; Mode was turned off
306 (easy-menu-remove reftex-mode-menu))) 308 (easy-menu-remove reftex-mode-menu)))
307 309
@@ -664,6 +666,16 @@ will deactivate it."
664(defvar reftex-find-label-regexp-format nil) 666(defvar reftex-find-label-regexp-format nil)
665(defvar reftex-find-label-regexp-format2 nil) 667(defvar reftex-find-label-regexp-format2 nil)
666 668
669;; Constants for making RefTeX open to Texinfo hooking
670(defvar reftex-section-pre-regexp "\\\\")
671;; Including `\' as a character to be matched at the end of the regexp
672;; will allow stuff like \begin{foo}\label{bar} to be matched. This
673;; will make the parser to advance one char too much. Therefore
674;; `reftex-parse-from-file' will step one char back if a section is
675;; found.
676(defvar reftex-section-post-regexp "\\*?\\(\\[[^]]*\\]\\)?[[{ \t\r\n\\]")
677(defvar reftex-section-info-function 'reftex-section-info)
678
667(defvar reftex-memory nil 679(defvar reftex-memory nil
668 "Memorizes old variable values to indicate changes in these variables.") 680 "Memorizes old variable values to indicate changes in these variables.")
669 681
@@ -1083,16 +1095,10 @@ This enforces rescanning the buffer on next use."
1083 reftex-include-file-commands "\\|") 1095 reftex-include-file-commands "\\|")
1084 "\\)[{ \t]+\\([^} \t\n\r]+\\)")) 1096 "\\)[{ \t]+\\([^} \t\n\r]+\\)"))
1085 (section-re 1097 (section-re
1086 ;; Including `\' as a character to be matched at the end 1098 (concat wbol reftex-section-pre-regexp "\\("
1087 ;; of the regexp will allow stuff like
1088 ;; \begin{foo}\label{bar} to be matched. This will make
1089 ;; the parser to advance one char too much. Therefore
1090 ;; `reftex-parse-from-file' will step one char back if a
1091 ;; section is found.
1092 (concat wbol "\\\\\\("
1093 (mapconcat (lambda (x) (regexp-quote (car x))) 1099 (mapconcat (lambda (x) (regexp-quote (car x)))
1094 reftex-section-levels-all "\\|") 1100 reftex-section-levels-all "\\|")
1095 "\\)\\*?\\(\\[[^]]*\\]\\)?[[{ \t\r\n\\]")) 1101 "\\)" reftex-section-post-regexp))
1096 (appendix-re (concat wbol "\\(\\\\appendix\\)")) 1102 (appendix-re (concat wbol "\\(\\\\appendix\\)"))
1097 (macro-re 1103 (macro-re
1098 (if macros-with-labels 1104 (if macros-with-labels