emacs-devel
[Top][All Lists]
Advanced

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

Re: nxml-mode does not remove its overlays


From: David Kastrup
Subject: Re: nxml-mode does not remove its overlays
Date: Sun, 09 Mar 2008 11:18:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Bastien <address@hidden> writes:

> Stefan Monnier <address@hidden> writes:
>
>> PS: To check if a buffer is widened, please use
>> (= (buffer-size) (- (point-max) (point-min)))
>
> This is something I've already been looking for several times.
>
> Maybe this could go in simple.el:
>
> (defun buffer-narrowed-p
>   "Return non-nil if the current buffer is narrowed."
>   (not (= (buffer-size)
>         (- (point-max) 
>            (point-min)))

Use /= rather than (not (= ... and a defsubst.  Of course, a defsubst
means that people are not free to change the buffer-size/point-min/max
semantics/invariants without having to recompile everything.

But I think I rather prefer if people have to work hard for a different
scenario...

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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