diff options
| author | Dmitry Antipov | 2013-01-17 09:52:13 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-01-17 09:52:13 +0400 |
| commit | 0e70695aa48cb34d8c3df6e4d4173b6adb474b23 (patch) | |
| tree | fd8fdd9947558bf5046ca6e92131ae64f23ddb95 /src | |
| parent | e59eee439c0e379bb062ffa26361ad90fd540406 (diff) | |
| download | emacs-0e70695aa48cb34d8c3df6e4d4173b6adb474b23.tar.gz emacs-0e70695aa48cb34d8c3df6e4d4173b6adb474b23.zip | |
* buffer.h (NARROWED, BUF_NARROWED): Drop unused macros.
(DECODE_POSITION, BUFFER_CHECK_INDIRECTION): Fix indentation.
* buffer.c (toplevel, syms_of_buffer): Drop old commented-out
debugging stubs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/buffer.c | 7 | ||||
| -rw-r--r-- | src/buffer.h | 61 |
3 files changed, 34 insertions, 41 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 115b8d42915..316995bf20b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-01-17 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * buffer.h (NARROWED, BUF_NARROWED): Drop unused macros. | ||
| 4 | (DECODE_POSITION, BUFFER_CHECK_INDIRECTION): Fix indentation. | ||
| 5 | * buffer.c (toplevel, syms_of_buffer): Drop old commented-out | ||
| 6 | debugging stubs. | ||
| 7 | |||
| 1 | 2013-01-15 Paul Eggert <eggert@cs.ucla.edu> | 8 | 2013-01-15 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 9 | ||
| 3 | * alloc.c (free_save_value): Now static. | 10 | * alloc.c (free_save_value): Now static. |
diff --git a/src/buffer.c b/src/buffer.c index 218ae1a7d11..66581cb7828 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -372,9 +372,6 @@ bset_zv_marker (struct buffer *b, Lisp_Object val) | |||
| 372 | b->INTERNAL_FIELD (zv_marker) = val; | 372 | b->INTERNAL_FIELD (zv_marker) = val; |
| 373 | } | 373 | } |
| 374 | 374 | ||
| 375 | /* For debugging; temporary. See set_buffer_internal. */ | ||
| 376 | /* Lisp_Object Qlisp_mode, Vcheck_symbol; */ | ||
| 377 | |||
| 378 | void | 375 | void |
| 379 | nsberror (Lisp_Object spec) | 376 | nsberror (Lisp_Object spec) |
| 380 | { | 377 | { |
| @@ -6003,10 +6000,6 @@ simple case that you moved off with C-b means scrolling just one line. | |||
| 6003 | window scrolls by a full window height. Meaningful values are | 6000 | window scrolls by a full window height. Meaningful values are |
| 6004 | between 0.0 and 1.0, inclusive. */); | 6001 | between 0.0 and 1.0, inclusive. */); |
| 6005 | 6002 | ||
| 6006 | /*DEFVAR_LISP ("debug-check-symbol", &Vcheck_symbol, | ||
| 6007 | "Don't ask."); | ||
| 6008 | */ | ||
| 6009 | |||
| 6010 | DEFVAR_LISP ("before-change-functions", Vbefore_change_functions, | 6003 | DEFVAR_LISP ("before-change-functions", Vbefore_change_functions, |
| 6011 | doc: /* List of functions to call before each text change. | 6004 | doc: /* List of functions to call before each text change. |
| 6012 | Two arguments are passed to each function: the positions of | 6005 | Two arguments are passed to each function: the positions of |
diff --git a/src/buffer.h b/src/buffer.h index b4cc21d675d..276cca32e48 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -82,9 +82,6 @@ INLINE_HEADER_BEGIN | |||
| 82 | /* Size of gap. */ | 82 | /* Size of gap. */ |
| 83 | #define GAP_SIZE (current_buffer->text->gap_size) | 83 | #define GAP_SIZE (current_buffer->text->gap_size) |
| 84 | 84 | ||
| 85 | /* Is the current buffer narrowed? */ | ||
| 86 | #define NARROWED ((BEGV != BEG) || (ZV != Z)) | ||
| 87 | |||
| 88 | /* Modification count. */ | 85 | /* Modification count. */ |
| 89 | #define MODIFF (current_buffer->text->modiff) | 86 | #define MODIFF (current_buffer->text->modiff) |
| 90 | 87 | ||
| @@ -173,10 +170,6 @@ INLINE_HEADER_BEGIN | |||
| 173 | /* Size of gap. */ | 170 | /* Size of gap. */ |
| 174 | #define BUF_GAP_SIZE(buf) ((buf)->text->gap_size) | 171 | #define BUF_GAP_SIZE(buf) ((buf)->text->gap_size) |
| 175 | 172 | ||
| 176 | /* Is this buffer narrowed? */ | ||
| 177 | #define BUF_NARROWED(buf) ((BUF_BEGV (buf) != BUF_BEG (buf)) \ | ||
| 178 | || (BUF_ZV (buf) != BUF_Z (buf))) | ||
| 179 | |||
| 180 | /* Modification count. */ | 173 | /* Modification count. */ |
| 181 | #define BUF_MODIFF(buf) ((buf)->text->modiff) | 174 | #define BUF_MODIFF(buf) ((buf)->text->modiff) |
| 182 | 175 | ||
| @@ -294,24 +287,24 @@ extern void enlarge_buffer_text (struct buffer *, ptrdiff_t); | |||
| 294 | /* Access a Lisp position value in POS, | 287 | /* Access a Lisp position value in POS, |
| 295 | and store the charpos in CHARPOS and the bytepos in BYTEPOS. */ | 288 | and store the charpos in CHARPOS and the bytepos in BYTEPOS. */ |
| 296 | 289 | ||
| 297 | #define DECODE_POSITION(charpos, bytepos, pos) \ | 290 | #define DECODE_POSITION(charpos, bytepos, pos) \ |
| 298 | do \ | 291 | do \ |
| 299 | { \ | 292 | { \ |
| 300 | Lisp_Object __pos = (pos); \ | 293 | Lisp_Object __pos = (pos); \ |
| 301 | if (NUMBERP (__pos)) \ | 294 | if (NUMBERP (__pos)) \ |
| 302 | { \ | 295 | { \ |
| 303 | charpos = __pos; \ | 296 | charpos = __pos; \ |
| 304 | bytepos = buf_charpos_to_bytepos (current_buffer, __pos); \ | 297 | bytepos = buf_charpos_to_bytepos (current_buffer, __pos); \ |
| 305 | } \ | 298 | } \ |
| 306 | else if (MARKERP (__pos)) \ | 299 | else if (MARKERP (__pos)) \ |
| 307 | { \ | 300 | { \ |
| 308 | charpos = marker_position (__pos); \ | 301 | charpos = marker_position (__pos); \ |
| 309 | bytepos = marker_byte_position (__pos); \ | 302 | bytepos = marker_byte_position (__pos); \ |
| 310 | } \ | 303 | } \ |
| 311 | else \ | 304 | else \ |
| 312 | wrong_type_argument (Qinteger_or_marker_p, __pos); \ | 305 | wrong_type_argument (Qinteger_or_marker_p, __pos); \ |
| 313 | } \ | 306 | } \ |
| 314 | while (0) | 307 | while (0) |
| 315 | 308 | ||
| 316 | /* Maximum number of bytes in a buffer. | 309 | /* Maximum number of bytes in a buffer. |
| 317 | A buffer cannot contain more bytes than a 1-origin fixnum can represent, | 310 | A buffer cannot contain more bytes than a 1-origin fixnum can represent, |
| @@ -1009,15 +1002,15 @@ bset_width_table (struct buffer *b, Lisp_Object val) | |||
| 1009 | #define BUFFER_CHECK_INDIRECTION(b) \ | 1002 | #define BUFFER_CHECK_INDIRECTION(b) \ |
| 1010 | do { \ | 1003 | do { \ |
| 1011 | if (BUFFER_LIVE_P (b)) \ | 1004 | if (BUFFER_LIVE_P (b)) \ |
| 1012 | { \ | 1005 | { \ |
| 1013 | if (b->base_buffer) \ | 1006 | if (b->base_buffer) \ |
| 1014 | { \ | 1007 | { \ |
| 1015 | eassert (b->indirections == -1); \ | 1008 | eassert (b->indirections == -1); \ |
| 1016 | eassert (b->base_buffer->indirections > 0); \ | 1009 | eassert (b->base_buffer->indirections > 0); \ |
| 1017 | } \ | 1010 | } \ |
| 1018 | else \ | 1011 | else \ |
| 1019 | eassert (b->indirections >= 0); \ | 1012 | eassert (b->indirections >= 0); \ |
| 1020 | } \ | 1013 | } \ |
| 1021 | } while (0) | 1014 | } while (0) |
| 1022 | 1015 | ||
| 1023 | /* Chain of all buffers, including killed ones. */ | 1016 | /* Chain of all buffers, including killed ones. */ |