From: Simon Josefsson <jas@extundo.com>
Cc: bugs@gnus.org, emacs-devel@gnu.org
Subject: Re: Suspicious code in gnus-read-descriptions-file
Date: Tue, 22 Mar 2005 22:53:49 +0100 [thread overview]
Message-ID: <iluoedbjqj6.fsf@latte.josefsson.org> (raw)
In-Reply-To: <jwvzmwvo6sb.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 22 Mar 2005 13:51:59 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> The code below looks very odd:
>
> (save-excursion
> (save-restriction
> (set-buffer nntp-server-buffer)
> (goto-char (point-min))
> (when (or (search-forward "\n.\n" nil t)
> (goto-char (point-max)))
> (beginning-of-line)
> (narrow-to-region (point-min) (point)))
>
> doing a set-buffer between the save-restriction and the narrow-to-region
> seems like a bug. How 'bout the patch below? Which turns the set-buffer
> into a with-current-buffer and moves it to before the save-excursion.
> Maybe the save-excursion could be dropped altogether?
FWIW, looks good to me.
next prev parent reply other threads:[~2005-03-22 21:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-22 18:51 Suspicious code in gnus-read-descriptions-file Stefan Monnier
2005-03-22 21:53 ` Simon Josefsson [this message]
2005-03-22 22:28 ` David Kastrup
2005-03-22 23:17 ` Jesper Harder
2005-03-23 12:53 ` Stefan
2005-03-24 14:07 ` Jesper Harder
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=iluoedbjqj6.fsf@latte.josefsson.org \
--to=jas@extundo.com \
--cc=bugs@gnus.org \
--cc=emacs-devel@gnu.org \
/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).