unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* detect narrowing?
@ 2003-09-17 22:34 Kin Cho
  2003-09-17 23:11 ` Jesper Harder
  0 siblings, 1 reply; 3+ messages in thread
From: Kin Cho @ 2003-09-17 22:34 UTC (permalink / raw)


Hi,

Is there a way (in elisp) to detect that a buffer is narrowed?

-kin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: detect narrowing?
  2003-09-17 22:34 detect narrowing? Kin Cho
@ 2003-09-17 23:11 ` Jesper Harder
  2003-09-18  2:38   ` Kin Cho
  0 siblings, 1 reply; 3+ messages in thread
From: Jesper Harder @ 2003-09-17 23:11 UTC (permalink / raw)


Kin Cho <kin@neoscale.com> writes:

> Is there a way (in elisp) to detect that a buffer is narrowed?

I think this should work:

(defun narrowing-in-effect-p ()
  (/= (buffer-size) (- (point-max) (point-min))))

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: detect narrowing?
  2003-09-17 23:11 ` Jesper Harder
@ 2003-09-18  2:38   ` Kin Cho
  0 siblings, 0 replies; 3+ messages in thread
From: Kin Cho @ 2003-09-18  2:38 UTC (permalink / raw)


Jesper Harder <harder@myrealbox.com> writes:

> (defun narrowing-in-effect-p ()
>   (/= (buffer-size) (- (point-max) (point-min))))

It works, thanks.

-kin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-18  2:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-17 22:34 detect narrowing? Kin Cho
2003-09-17 23:11 ` Jesper Harder
2003-09-18  2:38   ` Kin Cho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).