[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for reftex.el: master or release branch?
From: |
Tassilo Horn |
Subject: |
Re: Patch for reftex.el: master or release branch? |
Date: |
Wed, 14 Dec 2022 15:25:37 +0100 |
User-agent: |
mu4e 1.9.6; emacs 30.0.50 |
Eli Zaretskii <eliz@gnu.org> writes:
Hi Eli & Arash,
>> --8<---------------cut here---------------start------------->8---
>> diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
>> index f815419ea4..126b3777f5 100644
>> --- a/lisp/textmodes/reftex.el
>> +++ b/lisp/textmodes/reftex.el
>> @@ -1004,10 +1004,13 @@ reftex-compile-variables
>> 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
>> "\\|")
>> "\\)"))
>> --8<---------------cut here---------------end--------------->8---
>>
>> Can you please tell me if this should go to master or emacs-29
>> branch?
>
> How safe is the change? If it is safe enough, emacs-29 is fine.
>
> Tassilo, WDYT about the safety of the patch and/or
I would like to let Arash decide. I'm not familiar with that code but I
guess he has tested his change and I trust him.
The only thing the patch does is having a % in the regexp in the DTX
case or omitting it in the "normal TeX" case instead of optionally
allowing % in the latter case, too. That lead to the bug that commented
sections also increased the section counter.
> about the urgency to have the fix?
Well, I guess it's broken since 2016 and only now a user complained. So
the urgency is not very high.
Bye,
Tassilo