all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

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.