From: Sven Joachim <svenjoac@gmx.de>
To: help-gnu-emacs@gnu.org
Subject: Re: What variable says that the buffer is in narrowed state?
Date: Sat, 13 Oct 2007 15:45:43 +0200 [thread overview]
Message-ID: <87tzov5drs.fsf@gmx.de> (raw)
In-Reply-To: mailman.2016.1192278715.18990.help-gnu-emacs@gnu.org
Bastien <bzg@altern.org> writes:
> I expected to find some `buffer-narrowed-p' variable. Is there
> something like this? The mode-line is able to display this bit
> of information, so I guess it might somehow be accessible.
If there were such a thing, it should probably be a function rather
than a variable. Doesn't seem there is one, so I wrote it for you:
(defun buffer-narrowed-p ()
"Return t if buffer is narrowed, nil otherwise."
(or (> (point-min) 1)
(< (point-max) (buffer-size))))
The mode-line display is coded in src/xdisp.c, look for "Narrow"
there.
Cheers,
Sven
next parent reply other threads:[~2007-10-13 13:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2016.1192278715.18990.help-gnu-emacs@gnu.org>
2007-10-13 13:45 ` Sven Joachim [this message]
2007-10-13 15:57 ` What variable says that the buffer is in narrowed state? Bastien
2007-10-14 19:57 ` Stefan Monnier
2007-10-15 17:51 ` Sven Joachim
2007-10-13 13:30 Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tzov5drs.fsf@gmx.de \
--to=svenjoac@gmx.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.