[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how do I know that the buffer is narrowed
From: |
Pascal Bourguignon |
Subject: |
Re: how do I know that the buffer is narrowed |
Date: |
Wed, 30 Nov 2005 23:10:39 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"mak kwak" <makwak@wp.pl> writes:
> Do You know if there is any buffer local variable that tells this to me ?
Yes, there are some buffer local variables, but they're in C!
DEFUN ("widen", Fwiden, Swiden, 0, 0, "",
doc: /* Remove restrictions (narrowing) from current buffer.
This allows the buffer's full text to be seen and edited. */)
()
{
if (BEG != BEGV || Z != ZV)
current_buffer->clip_changed = 1;
...
>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))))))
--
__Pascal Bourguignon__ http://www.informatimago.com/
Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we. -- Georges W. Bush