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: Johan Bockgård
Subject: Re: how do I know that the buffer is narrowed
Date: Wed, 30 Nov 2005 23:41:08 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

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

-- 
Johan Bockgård


reply via email to

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