Mercurial > emacs
changeset 2564:6fee7500fabd
(BUF_NARROWED, NARROWED): New macros to test whether a region
restriction has narrowed the buffer.
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Fri, 23 Apr 1993 03:06:10 +0000 |
parents | c8ae06bda9fa |
children | c1a1557bffde |
files | src/buffer.h |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buffer.h Fri Apr 23 02:21:02 1993 +0000 +++ b/src/buffer.h Fri Apr 23 03:06:10 1993 +0000 @@ -53,6 +53,9 @@ /* 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 @@ /* 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)