Commit e12f3519 authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

(BUF_NARROWED, NARROWED): New macros to test whether a region

restriction has narrowed the buffer.
parent 2fcf8a07
......@@ -53,6 +53,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Character position of end of buffer. */
#define Z (current_buffer->text.z)
/* Is the current buffer narrowed? */
#define NARROWED ((BEGV != BEG) || (ZV != Z))
/* Modification count. */
#define MODIFF (current_buffer->text.modiff)
......@@ -98,6 +101,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Character position of end of buffer. */
#define BUF_Z(buf) ((buf)->text.z)
/* Is this buffer narrowed? */
#define BUF_NARROWED(buf) ((BUF_BEGV(buf) != BUF_BEG(buf)) \
|| (BUF_ZV(buf) != BUF_Z(buf)))
/* Modification count. */
#define BUF_MODIFF(buf) ((buf)->text.modiff)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment