emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [elpa] externals/rec-mode e06fafdfb9 1/2: rec-mode.el: do not use lo


From: Jose E. Marchesi
Subject: Re: [elpa] externals/rec-mode e06fafdfb9 1/2: rec-mode.el: do not use looking-back in rec-beginning-of-field-pos
Date: Mon, 20 Nov 2023 23:20:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Stefan.

Good (point)!
I just pushed your fix.  Thank you!

>> +    (while (and (not (= (line-beginning-position) 1))
>> +                (or (looking-at "\\+")
>> +                    (and (> (point) 1)
>> +                         (save-excursion
>> +                           (backward-char 2)
>> +                           (looking-at "\\\\\n")))))
>
> Better avoid hard coded buffer positions, since they break down in
> narrowed buffers:
>
>     (while (and (not (= (line-beginning-position) (point-min)))
>                 (or (looking-at "\\+")
>                     (and (not (bobp))
>                          (save-excursion
>                            (backward-char 2)
>                            (looking-at "\\\\\n")))))
>
>
> -- Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]