diff options
Diffstat (limited to 'lisp/textmodes/reftex.el')
-rw-r--r-- | lisp/textmodes/reftex.el | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index d511bf9ff8b..21083fd188a 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -301,7 +301,9 @@ on the menu bar. (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) + + (run-hooks 'reftex-mode-hook)) ;; Mode was turned off (easy-menu-remove reftex-mode-menu))) @@ -664,6 +666,16 @@ will deactivate it." (defvar reftex-find-label-regexp-format nil) (defvar reftex-find-label-regexp-format2 nil) +;; Constants for making RefTeX open to Texinfo hooking +(defvar reftex-section-pre-regexp "\\\\") +;; Including `\' as a character to be matched at the end of the regexp +;; will allow stuff like \begin{foo}\label{bar} to be matched. This +;; will make the parser to advance one char too much. Therefore +;; `reftex-parse-from-file' will step one char back if a section is +;; found. +(defvar reftex-section-post-regexp "\\*?\\(\\[[^]]*\\]\\)?[[{ \t\r\n\\]") +(defvar reftex-section-info-function 'reftex-section-info) + (defvar reftex-memory nil "Memorizes old variable values to indicate changes in these variables.") @@ -1069,13 +1081,7 @@ This enforces rescanning the buffer on next use." (wbol "\\(^\\)[ \t]*") ; Need to keep the empty group because ; match numbers are hard coded (label-re (concat "\\(?:" - ;; Normal \label{...} - "\\\\label{\\([^}]*\\)}" - "\\|" - ;; keyvals [..., label = {foo}, ...] - ;; forms used by ctable, listings, - ;; minted, ... - "\\[[^]]*label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?" + (mapconcat 'identity reftex-label-regexps "\\|") "\\)")) (include-re (concat wbol "\\\\\\(" @@ -1083,16 +1089,10 @@ This enforces rescanning the buffer on next use." reftex-include-file-commands "\\|") "\\)[{ \t]+\\([^} \t\n\r]+\\)")) (section-re - ;; Including `\' as a character to be matched at the end - ;; of the regexp will allow stuff like - ;; \begin{foo}\label{bar} to be matched. This will make - ;; the parser to advance one char too much. Therefore - ;; `reftex-parse-from-file' will step one char back if a - ;; section is found. - (concat wbol "\\\\\\(" + (concat wbol reftex-section-pre-regexp "\\(" (mapconcat (lambda (x) (regexp-quote (car x))) reftex-section-levels-all "\\|") - "\\)\\*?\\(\\[[^]]*\\]\\)?[[{ \t\r\n\\]")) + "\\)" reftex-section-post-regexp)) (appendix-re (concat wbol "\\(\\\\appendix\\)")) (macro-re (if macros-with-labels @@ -2458,7 +2458,7 @@ information about your RefTeX version and configuration." (require 'reporter) (let ((reporter-prompt-for-summary-p "Bug report subject: ")) (reporter-submit-bug-report - "bug-auctex@gnu.org" + "bug-auctex@gnu.org, bug-gnu-emacs@gnu.org" reftex-version (list 'window-system 'reftex-plug-into-AUCTeX) |