unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jose E. Marchesi" <jemarch@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Jose E. Marchesi <jose.marchesi@oracle.com>,  emacs-devel@gnu.org
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	[thread overview]
Message-ID: <87pm04oymf.fsf@gnu.org> (raw)
In-Reply-To: <jwvttpgxrtv.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 20 Nov 2023 12:25:15 -0500")


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	other threads:[~2023-11-20 22:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <170049232573.19582.9641540634313938438@vcs2.savannah.gnu.org>
     [not found] ` <20231120145846.2B67DC0C1BE@vcs2.savannah.gnu.org>
2023-11-20 17:25   ` [elpa] externals/rec-mode e06fafdfb9 1/2: rec-mode.el: do not use looking-back in rec-beginning-of-field-pos Stefan Monnier
2023-11-20 22:20     ` Jose E. Marchesi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pm04oymf.fsf@gnu.org \
    --to=jemarch@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jose.marchesi@oracle.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).