Fix handling of % when searching in .tex or .dtx files
* lisp/textmodes/reftex.el (reftex-compile-variables): Consider % when building the regexp for searching only in .dtx files. (AUCTeX bug#59638)
This commit is contained in:
parent
3b226b6024
commit
622838b957
1 changed files with 7 additions and 4 deletions
|
@ -1004,10 +1004,13 @@ This enforces rescanning the buffer on next use."
|
|||
reftex-section-levels))
|
||||
|
||||
;; Calculate the regular expressions
|
||||
(let* (
|
||||
; (wbol "\\(\\`\\|[\n\r]\\)[ \t]*")
|
||||
(wbol "\\(^\\)%?[ \t]*") ; Need to keep the empty group because
|
||||
; match numbers are hard coded
|
||||
(let* (;; (wbol "\\(\\`\\|[\n\r]\\)[ \t]*")
|
||||
;; Need to keep the empty group because match numbers are
|
||||
;; hard coded
|
||||
(wbol (concat "\\(^\\)"
|
||||
(when (string-suffix-p ".dtx" (buffer-file-name) t)
|
||||
"%")
|
||||
"[ \t]*"))
|
||||
(label-re (concat "\\(?:"
|
||||
(mapconcat #'identity reftex-label-regexps "\\|")
|
||||
"\\)"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue