all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: emacs-devel@gnu.org
Subject: narrowedp?
Date: Thu, 1 Oct 2009 10:17:06 +0000	[thread overview]
Message-ID: <20091001101706.GC4599@muc.de> (raw)

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

.  Actually, I really just want to test the lower bound (to know whether
to need to test for point-min being inside a literal).  But testing
point-min against "1" seems a bit unemacsy and unfutureproof.  When
Emacs gets good multi-major-mode facilities, the "beginning of buffer"
will not be 1, rather the beginning of the particular buffer part.  Or
something like that.

-- 
Alan Mackenzie (Nuremberg, Germany).




             reply	other threads:[~2009-10-01 10:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-01 10:17 Alan Mackenzie [this message]
2009-10-01 10:38 ` narrowedp? David Kastrup
2009-10-01 11:06   ` narrowedp? Lennart Borgman

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=20091001101706.GC4599@muc.de \
    --to=acm@muc.de \
    --cc=emacs-devel@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.