diff options
| author | Gerd Moellmann | 1999-11-14 16:37:23 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-11-14 16:37:23 +0000 |
| commit | 5bcfeb490ea59d6d58c8f30f6840995b8818763d (patch) | |
| tree | ad4bbf1963ac76dd22901974c77c59db7cf35ca0 /src | |
| parent | 887d6f8094b58211064e3f3b8860df9509b3ef52 (diff) | |
| download | emacs-5bcfeb490ea59d6d58c8f30f6840995b8818763d.tar.gz emacs-5bcfeb490ea59d6d58c8f30f6840995b8818763d.zip | |
(ensure_echo_area_buffers): New.
(with_echo_area_buffer): Use it.
(setup_echo_area_for_printing): Ditto.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 31 |
2 files changed, 27 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b4d26a26abe..63525b0f2d6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 1999-11-14 Gerd Moellmann <gerd@gnu.org> | 1 | 1999-11-14 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c (ensure_echo_area_buffers): New. | ||
| 4 | (with_echo_area_buffer): Use it. | ||
| 5 | (setup_echo_area_for_printing): Ditto. | ||
| 6 | |||
| 3 | * buffer.c (indicate-empty-lines): Doc-fix. | 7 | * buffer.c (indicate-empty-lines): Doc-fix. |
| 4 | 8 | ||
| 5 | 1999-11-12 Gerd Moellmann <gerd@gnu.org> | 9 | 1999-11-12 Gerd Moellmann <gerd@gnu.org> |
diff --git a/src/xdisp.c b/src/xdisp.c index 484474c2ab6..caa887b39a6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -582,6 +582,7 @@ enum move_it_result | |||
| 582 | 582 | ||
| 583 | /* Function prototypes. */ | 583 | /* Function prototypes. */ |
| 584 | 584 | ||
| 585 | static void ensure_echo_area_buffers P_ ((void)); | ||
| 585 | static struct glyph_row *row_containing_pos P_ ((struct window *, int, | 586 | static struct glyph_row *row_containing_pos P_ ((struct window *, int, |
| 586 | struct glyph_row *, | 587 | struct glyph_row *, |
| 587 | struct glyph_row *)); | 588 | struct glyph_row *)); |
| @@ -5162,6 +5163,25 @@ update_echo_area () | |||
| 5162 | } | 5163 | } |
| 5163 | 5164 | ||
| 5164 | 5165 | ||
| 5166 | /* Make sure echo area buffers in echo_buffers[] are life. If they | ||
| 5167 | aren't, make new ones. */ | ||
| 5168 | |||
| 5169 | static void | ||
| 5170 | ensure_echo_area_buffers () | ||
| 5171 | { | ||
| 5172 | int i; | ||
| 5173 | |||
| 5174 | for (i = 0; i < 2; ++i) | ||
| 5175 | if (!BUFFERP (echo_buffer[i]) | ||
| 5176 | || NILP (XBUFFER (echo_buffer[i])->name)) | ||
| 5177 | { | ||
| 5178 | char name[30]; | ||
| 5179 | sprintf (name, " *Echo Area %d*", i); | ||
| 5180 | echo_buffer[i] = Fget_buffer_create (build_string (name)); | ||
| 5181 | } | ||
| 5182 | } | ||
| 5183 | |||
| 5184 | |||
| 5165 | /* Call FN with args A1..A5 with either the current or last displayed | 5185 | /* Call FN with args A1..A5 with either the current or last displayed |
| 5166 | echo_area_buffer as current buffer. | 5186 | echo_area_buffer as current buffer. |
| 5167 | 5187 | ||
| @@ -5190,14 +5210,7 @@ with_echo_area_buffer (w, which, fn, a1, a2, a3, a4, a5) | |||
| 5190 | int count = specpdl_ptr - specpdl; | 5210 | int count = specpdl_ptr - specpdl; |
| 5191 | 5211 | ||
| 5192 | /* If buffers aren't life, make new ones. */ | 5212 | /* If buffers aren't life, make new ones. */ |
| 5193 | for (i = 0; i < 2; ++i) | 5213 | ensure_echo_area_buffers (); |
| 5194 | if (!BUFFERP (echo_buffer[i]) | ||
| 5195 | || NILP (XBUFFER (echo_buffer[i])->name)) | ||
| 5196 | { | ||
| 5197 | char name[30]; | ||
| 5198 | sprintf (name, " *Echo Area %d*", i); | ||
| 5199 | echo_buffer[i] = Fget_buffer_create (build_string (name)); | ||
| 5200 | } | ||
| 5201 | 5214 | ||
| 5202 | clear_buffer_p = 0; | 5215 | clear_buffer_p = 0; |
| 5203 | 5216 | ||
| @@ -5349,6 +5362,8 @@ void | |||
| 5349 | setup_echo_area_for_printing (multibyte_p) | 5362 | setup_echo_area_for_printing (multibyte_p) |
| 5350 | int multibyte_p; | 5363 | int multibyte_p; |
| 5351 | { | 5364 | { |
| 5365 | ensure_echo_area_buffers (); | ||
| 5366 | |||
| 5352 | if (!message_buf_print) | 5367 | if (!message_buf_print) |
| 5353 | { | 5368 | { |
| 5354 | /* A message has been output since the last time we printed. | 5369 | /* A message has been output since the last time we printed. |