emacs-devel
[Top][All Lists]
Advanced

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

Re: narrowedp?


From: David Kastrup
Subject: Re: narrowedp?
Date: Thu, 01 Oct 2009 12:38:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Alan Mackenzie <address@hidden> writes:

> Hi, Emacs!
>
> There doesn't seem to be a function `narrowedp'.  This is, perhaps, an
> unfortunate lack.
>
> It's easy enough to test the lower bound:
>
>     (eq (point-min) 1)
>
> , but the upper bound is a touch tedious:
>
>     (save-restriction
>       (let ((reg-end (point-max)))
>         (widen)
>       (eq reg-end (point-max))))

Try (> (point-max) (buffer-size)) for that.

Checking both can be done with
(= (- (point-max) (point-min)) (buffer-size))

-- 
David Kastrup





reply via email to

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