emacs-devel
[Top][All Lists]
Advanced

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

Re: Suspicious code in gnus-read-descriptions-file


From: Simon Josefsson
Subject: Re: Suspicious code in gnus-read-descriptions-file
Date: Tue, 22 Mar 2005 22:53:49 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> 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.




reply via email to

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