[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 00:10:01 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
> Pascal Bourguignon <spam@mouse-potato.com> writes:
>
>> From lisp, you could compare (point-min) and (point-max):
>>
>> (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))
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum