Mercurial > emacs
comparison src/buffer.h @ 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 | e611237d4420 |
| children | 683f4472f1c8 |
comparison
equal
deleted
inserted
replaced
| 2563:c8ae06bda9fa | 2564:6fee7500fabd |
|---|---|
| 51 #define ZV (current_buffer->text.zv) | 51 #define ZV (current_buffer->text.zv) |
| 52 | 52 |
| 53 /* Character position of end of buffer. */ | 53 /* Character position of end of buffer. */ |
| 54 #define Z (current_buffer->text.z) | 54 #define Z (current_buffer->text.z) |
| 55 | 55 |
| 56 /* Is the current buffer narrowed? */ | |
| 57 #define NARROWED ((BEGV != BEG) || (ZV != Z)) | |
| 58 | |
| 56 /* Modification count. */ | 59 /* Modification count. */ |
| 57 #define MODIFF (current_buffer->text.modiff) | 60 #define MODIFF (current_buffer->text.modiff) |
| 58 | 61 |
| 59 /* Address of beginning of buffer. */ | 62 /* Address of beginning of buffer. */ |
| 60 #define BEG_ADDR (current_buffer->text.beg) | 63 #define BEG_ADDR (current_buffer->text.beg) |
| 95 /* Character position of end of accessible range of buffer. */ | 98 /* Character position of end of accessible range of buffer. */ |
| 96 #define BUF_ZV(buf) ((buf)->text.zv) | 99 #define BUF_ZV(buf) ((buf)->text.zv) |
| 97 | 100 |
| 98 /* Character position of end of buffer. */ | 101 /* Character position of end of buffer. */ |
| 99 #define BUF_Z(buf) ((buf)->text.z) | 102 #define BUF_Z(buf) ((buf)->text.z) |
| 103 | |
| 104 /* Is this buffer narrowed? */ | |
| 105 #define BUF_NARROWED(buf) ((BUF_BEGV(buf) != BUF_BEG(buf)) \ | |
| 106 || (BUF_ZV(buf) != BUF_Z(buf))) | |
| 100 | 107 |
| 101 /* Modification count. */ | 108 /* Modification count. */ |
| 102 #define BUF_MODIFF(buf) ((buf)->text.modiff) | 109 #define BUF_MODIFF(buf) ((buf)->text.modiff) |
| 103 | 110 |
| 104 /* Address of beginning of buffer. */ | 111 /* Address of beginning of buffer. */ |
