help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: how do I know that the buffer is narrowed


From: David Kastrup
Subject: Re: how do I know that the buffer is narrowed
Date: Thu, 01 Dec 2005 13:12:55 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Giorgos Keramidas <keramida@ceid.upatras.gr> writes:

> On Thu, 01 Dec 2005 00:10:01 +0100, David Kastrup <dak@gnu.org> wrote:
>> bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
>>>> (defun narrowedp ()
>>>>   (not (equal (list (point-min) (point-max))
>>>>               (save-restriction (widen) (list (point-min) (point-max))))))
>>>
>>>
>>> (not (and (= (point-min) 1)
>>>           (= (point-max) (1+ (buffer-size)))))
>>
>> (<(-(point-max)(point-min))(buffer-size))
>
> Pfeh!  Is there any good reason to obfuscate the beautiful:
>
>     (not (and (= (point-min) 1)
>               (= (point-max) (1+ (buffer-size)))))
>
> *and* remove all its spaces? :)

It is impolite to let your parens do more work than necessary.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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