[Top][All Lists]

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

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

From: David Kastrup
Subject: Re: Suspicious code in gnus-read-descriptions-file
Date: Tue, 22 Mar 2005 23:28:23 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> 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?

You mean, the save-restriction?

> FWIW, looks good to me.

Not to me.  Seems to restore the restriction in another boffer, not

Even if this is for some weird reason what was intended, it should be
rearranged or well documented to stop people worrying about it.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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