diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/buffer.c b/src/buffer.c index 22624e33a4b..356a308fce6 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -550,11 +550,11 @@ even if it is dead. The return value is never nil. */) | |||
| 550 | b->indirections = 0; | 550 | b->indirections = 0; |
| 551 | 551 | ||
| 552 | BUF_GAP_SIZE (b) = 20; | 552 | BUF_GAP_SIZE (b) = 20; |
| 553 | BLOCK_INPUT; | 553 | block_input (); |
| 554 | /* We allocate extra 1-byte at the tail and keep it always '\0' for | 554 | /* We allocate extra 1-byte at the tail and keep it always '\0' for |
| 555 | anchoring a search. */ | 555 | anchoring a search. */ |
| 556 | alloc_buffer_text (b, BUF_GAP_SIZE (b) + 1); | 556 | alloc_buffer_text (b, BUF_GAP_SIZE (b) + 1); |
| 557 | UNBLOCK_INPUT; | 557 | unblock_input (); |
| 558 | if (! BUF_BEG_ADDR (b)) | 558 | if (! BUF_BEG_ADDR (b)) |
| 559 | buffer_memory_full (BUF_GAP_SIZE (b) + 1); | 559 | buffer_memory_full (BUF_GAP_SIZE (b) + 1); |
| 560 | 560 | ||
| @@ -1923,7 +1923,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1923 | 1923 | ||
| 1924 | bset_name (b, Qnil); | 1924 | bset_name (b, Qnil); |
| 1925 | 1925 | ||
| 1926 | BLOCK_INPUT; | 1926 | block_input (); |
| 1927 | if (b->base_buffer) | 1927 | if (b->base_buffer) |
| 1928 | { | 1928 | { |
| 1929 | /* Notify our base buffer that we don't share the text anymore. */ | 1929 | /* Notify our base buffer that we don't share the text anymore. */ |
| @@ -1946,7 +1946,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1946 | b->width_run_cache = 0; | 1946 | b->width_run_cache = 0; |
| 1947 | } | 1947 | } |
| 1948 | bset_width_table (b, Qnil); | 1948 | bset_width_table (b, Qnil); |
| 1949 | UNBLOCK_INPUT; | 1949 | unblock_input (); |
| 1950 | bset_undo_list (b, Qnil); | 1950 | bset_undo_list (b, Qnil); |
| 1951 | 1951 | ||
| 1952 | /* Run buffer-list-update-hook. */ | 1952 | /* Run buffer-list-update-hook. */ |
| @@ -5032,7 +5032,7 @@ alloc_buffer_text (struct buffer *b, ptrdiff_t nbytes) | |||
| 5032 | { | 5032 | { |
| 5033 | void *p; | 5033 | void *p; |
| 5034 | 5034 | ||
| 5035 | BLOCK_INPUT; | 5035 | block_input (); |
| 5036 | #if defined USE_MMAP_FOR_BUFFERS | 5036 | #if defined USE_MMAP_FOR_BUFFERS |
| 5037 | p = mmap_alloc ((void **) &b->text->beg, nbytes); | 5037 | p = mmap_alloc ((void **) &b->text->beg, nbytes); |
| 5038 | #elif defined REL_ALLOC | 5038 | #elif defined REL_ALLOC |
| @@ -5043,12 +5043,12 @@ alloc_buffer_text (struct buffer *b, ptrdiff_t nbytes) | |||
| 5043 | 5043 | ||
| 5044 | if (p == NULL) | 5044 | if (p == NULL) |
| 5045 | { | 5045 | { |
| 5046 | UNBLOCK_INPUT; | 5046 | unblock_input (); |
| 5047 | memory_full (nbytes); | 5047 | memory_full (nbytes); |
| 5048 | } | 5048 | } |
| 5049 | 5049 | ||
| 5050 | b->text->beg = (unsigned char *) p; | 5050 | b->text->beg = (unsigned char *) p; |
| 5051 | UNBLOCK_INPUT; | 5051 | unblock_input (); |
| 5052 | } | 5052 | } |
| 5053 | 5053 | ||
| 5054 | /* Enlarge buffer B's text buffer by DELTA bytes. DELTA < 0 means | 5054 | /* Enlarge buffer B's text buffer by DELTA bytes. DELTA < 0 means |
| @@ -5060,7 +5060,7 @@ enlarge_buffer_text (struct buffer *b, ptrdiff_t delta) | |||
| 5060 | void *p; | 5060 | void *p; |
| 5061 | ptrdiff_t nbytes = (BUF_Z_BYTE (b) - BUF_BEG_BYTE (b) + BUF_GAP_SIZE (b) + 1 | 5061 | ptrdiff_t nbytes = (BUF_Z_BYTE (b) - BUF_BEG_BYTE (b) + BUF_GAP_SIZE (b) + 1 |
| 5062 | + delta); | 5062 | + delta); |
| 5063 | BLOCK_INPUT; | 5063 | block_input (); |
| 5064 | #if defined USE_MMAP_FOR_BUFFERS | 5064 | #if defined USE_MMAP_FOR_BUFFERS |
| 5065 | p = mmap_realloc ((void **) &b->text->beg, nbytes); | 5065 | p = mmap_realloc ((void **) &b->text->beg, nbytes); |
| 5066 | #elif defined REL_ALLOC | 5066 | #elif defined REL_ALLOC |
| @@ -5071,12 +5071,12 @@ enlarge_buffer_text (struct buffer *b, ptrdiff_t delta) | |||
| 5071 | 5071 | ||
| 5072 | if (p == NULL) | 5072 | if (p == NULL) |
| 5073 | { | 5073 | { |
| 5074 | UNBLOCK_INPUT; | 5074 | unblock_input (); |
| 5075 | memory_full (nbytes); | 5075 | memory_full (nbytes); |
| 5076 | } | 5076 | } |
| 5077 | 5077 | ||
| 5078 | BUF_BEG_ADDR (b) = (unsigned char *) p; | 5078 | BUF_BEG_ADDR (b) = (unsigned char *) p; |
| 5079 | UNBLOCK_INPUT; | 5079 | unblock_input (); |
| 5080 | } | 5080 | } |
| 5081 | 5081 | ||
| 5082 | 5082 | ||
| @@ -5085,7 +5085,7 @@ enlarge_buffer_text (struct buffer *b, ptrdiff_t delta) | |||
| 5085 | static void | 5085 | static void |
| 5086 | free_buffer_text (struct buffer *b) | 5086 | free_buffer_text (struct buffer *b) |
| 5087 | { | 5087 | { |
| 5088 | BLOCK_INPUT; | 5088 | block_input (); |
| 5089 | 5089 | ||
| 5090 | #if defined USE_MMAP_FOR_BUFFERS | 5090 | #if defined USE_MMAP_FOR_BUFFERS |
| 5091 | mmap_free ((void **) &b->text->beg); | 5091 | mmap_free ((void **) &b->text->beg); |
| @@ -5096,7 +5096,7 @@ free_buffer_text (struct buffer *b) | |||
| 5096 | #endif | 5096 | #endif |
| 5097 | 5097 | ||
| 5098 | BUF_BEG_ADDR (b) = NULL; | 5098 | BUF_BEG_ADDR (b) = NULL; |
| 5099 | UNBLOCK_INPUT; | 5099 | unblock_input (); |
| 5100 | } | 5100 | } |
| 5101 | 5101 | ||
| 5102 | 5102 | ||