aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1992-10-31 05:41:20 +0000
committerJim Blandy1992-10-31 05:41:20 +0000
commitded34426d50233ec8021adec03a893d33452dc51 (patch)
treefd37ae9cce20923006f3eea0ef80f322289d3a99 /src
parent77511369af3b99a6fd2603eedfba46df20c9d05c (diff)
downloademacs-ded34426d50233ec8021adec03a893d33452dc51.tar.gz
emacs-ded34426d50233ec8021adec03a893d33452dc51.zip
* xdisp.c (redisplay): Use ! EQ to compare the old and new arrow
positions, not !=. (mark_window_display_accurate): Barf if WINDOW isn't a window. (display_string): Test buffer_defaults.ctl_arrow using NILP, instead of comparing it with zero. * xdisp.c (last_arrow_position, last_arrow_string): Make these static. * xdisp.c (message): Re-write this in terms of message1. (message1): Move code to clear out echo_area_glyphs and previous_echo_glyphs from message to here.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c105
1 files changed, 48 insertions, 57 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index eb78d11d8f9..f59f56b0baf 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -86,7 +86,7 @@ Lisp_Object Voverlay_arrow_position;
86Lisp_Object Voverlay_arrow_string; 86Lisp_Object Voverlay_arrow_string;
87 87
88/* Values of those variables at last redisplay. */ 88/* Values of those variables at last redisplay. */
89Lisp_Object last_arrow_position, last_arrow_string; 89static Lisp_Object last_arrow_position, last_arrow_string;
90 90
91/* Nonzero if overlay arrow has been displayed once in this window. */ 91/* Nonzero if overlay arrow has been displayed once in this window. */
92static int overlay_arrow_seen; 92static int overlay_arrow_seen;
@@ -167,6 +167,47 @@ int clip_changed;
167int windows_or_buffers_changed; 167int windows_or_buffers_changed;
168 168
169 169
170/* Specify m, a string, as a message in the minibuf. If m is 0, clear out
171 any existing message, and let the minibuffer text show through. */
172void
173message1 (m)
174 char *m;
175{
176 if (noninteractive)
177 {
178 if (noninteractive_need_newline)
179 putc ('\n', stderr);
180 noninteractive_need_newline = 0;
181 fprintf (stderr, "%s\n", m);
182 fflush (stderr);
183 }
184 /* A null message buffer means that the frame hasn't really been
185 initialized yet. Error messages get reported properly by
186 cmd_error, so this must be just an informative message; toss it. */
187 else if (INTERACTIVE && FRAME_MESSAGE_BUF (selected_frame))
188 {
189#ifdef MULTI_FRAME
190 Lisp_Object minibuf_frame;
191
192 choose_minibuf_frame ();
193 minibuf_frame = WINDOW_FRAME (XWINDOW (minibuf_window));
194 if (FRAME_VISIBLE_P (selected_frame)
195 && ! FRAME_VISIBLE_P (XFRAME (minibuf_frame)))
196 Fmake_frame_visible (WINDOW_FRAME (XWINDOW (minibuf_window)));
197#endif
198
199 if (m)
200 echo_area_glyphs = m;
201 else
202 echo_area_glyphs = previous_echo_glyphs = 0;
203
204 do_pending_window_change ();
205 echo_area_display ();
206 update_frame (XFRAME (XWINDOW (minibuf_window)->frame), 1, 1);
207 do_pending_window_change ();
208 }
209}
210
170/* Nonzero if FRAME_MESSAGE_BUF (selected_frame) is being used by print; 211/* Nonzero if FRAME_MESSAGE_BUF (selected_frame) is being used by print;
171 zero if being used by message. */ 212 zero if being used by message. */
172int message_buf_print; 213int message_buf_print;
@@ -195,16 +236,6 @@ message (m, a1, a2, a3)
195 cmd_error, so this must be just an informative message; toss it. */ 236 cmd_error, so this must be just an informative message; toss it. */
196 else if (INTERACTIVE && FRAME_MESSAGE_BUF (selected_frame)) 237 else if (INTERACTIVE && FRAME_MESSAGE_BUF (selected_frame))
197 { 238 {
198#ifdef MULTI_FRAME
199 Lisp_Object minibuf_frame;
200
201 choose_minibuf_frame ();
202 minibuf_frame = WINDOW_FRAME (XWINDOW (minibuf_window));
203 if (FRAME_VISIBLE_P (selected_frame)
204 && ! FRAME_VISIBLE_P (XFRAME (minibuf_frame)))
205 Fmake_frame_visible (WINDOW_FRAME (XWINDOW (minibuf_window)));
206#endif
207
208 if (m) 239 if (m)
209 { 240 {
210 { 241 {
@@ -222,55 +253,14 @@ message (m, a1, a2, a3)
222#endif /* NO_ARG_ARRAY */ 253#endif /* NO_ARG_ARRAY */
223 } 254 }
224 255
225 echo_area_glyphs = FRAME_MESSAGE_BUF (selected_frame); 256 message1 (FRAME_MESSAGE_BUF (selected_frame));
226 } 257 }
227 else 258 else
228 echo_area_glyphs = previous_echo_glyphs = 0; 259 message1 (0);
229 260
230 /* Print should start at the beginning of the message 261 /* Print should start at the beginning of the message
231 buffer next time. */ 262 buffer next time. */
232 message_buf_print = 0; 263 message_buf_print = 0;
233
234 do_pending_window_change ();
235 echo_area_display ();
236 update_frame (XFRAME (XWINDOW (minibuf_window)->frame), 1, 1);
237 do_pending_window_change ();
238 }
239}
240
241/* Specify m, a string, as a message in the minibuf. */
242void
243message1 (m)
244 char *m;
245{
246 if (noninteractive)
247 {
248 if (noninteractive_need_newline)
249 putc ('\n', stderr);
250 noninteractive_need_newline = 0;
251 fprintf (stderr, "%s\n", m);
252 fflush (stderr);
253 }
254 /* A null message buffer means that the frame hasn't really been
255 initialized yet. Error messages get reported properly by
256 cmd_error, so this must be just an informative message; toss it. */
257 else if (INTERACTIVE && FRAME_MESSAGE_BUF (selected_frame))
258 {
259#ifdef MULTI_FRAME
260 Lisp_Object minibuf_frame;
261
262 choose_minibuf_frame ();
263 minibuf_frame = WINDOW_FRAME (XWINDOW (minibuf_window));
264 if (FRAME_VISIBLE_P (selected_frame)
265 && ! FRAME_VISIBLE_P (XFRAME (minibuf_frame)))
266 Fmake_frame_visible (WINDOW_FRAME (XWINDOW (minibuf_window)));
267#endif
268
269 echo_area_glyphs = m;
270 do_pending_window_change ();
271 echo_area_display ();
272 update_frame (XFRAME (XWINDOW (minibuf_window)->frame), 1, 1);
273 do_pending_window_change ();
274 } 264 }
275} 265}
276 266
@@ -393,8 +383,8 @@ redisplay ()
393 383
394 /* If specs for an arrow have changed, do thorough redisplay 384 /* If specs for an arrow have changed, do thorough redisplay
395 to ensure we remove any arrow that should no longer exist. */ 385 to ensure we remove any arrow that should no longer exist. */
396 if (Voverlay_arrow_position != last_arrow_position 386 if (! EQ (Voverlay_arrow_position, last_arrow_position)
397 || Voverlay_arrow_string != last_arrow_string) 387 || ! EQ (Voverlay_arrow_string, last_arrow_string))
398 all_windows = 1, clip_changed = 1; 388 all_windows = 1, clip_changed = 1;
399 389
400 tlbufpos = this_line_bufpos; 390 tlbufpos = this_line_bufpos;
@@ -661,6 +651,7 @@ mark_window_display_accurate (window, flag)
661 651
662 for (;!NILP (window); window = w->next) 652 for (;!NILP (window); window = w->next)
663 { 653 {
654 if (XTYPE (window) != Lisp_Window) abort ();
664 w = XWINDOW (window); 655 w = XWINDOW (window);
665 656
666 if (!NILP (w->buffer)) 657 if (!NILP (w->buffer))
@@ -2242,7 +2233,7 @@ display_string (w, vpos, string, hpos, truncate, mincol, maxcol)
2242 } 2233 }
2243 else if (dp != 0 && XTYPE (DISP_CHAR_ROPE (dp, c)) == Lisp_String) 2234 else if (dp != 0 && XTYPE (DISP_CHAR_ROPE (dp, c)) == Lisp_String)
2244 p1 = copy_rope (p1, start, DISP_CHAR_ROPE (dp, c)); 2235 p1 = copy_rope (p1, start, DISP_CHAR_ROPE (dp, c));
2245 else if (c < 0200 && buffer_defaults.ctl_arrow) 2236 else if (c < 0200 && ! NILP (buffer_defaults.ctl_arrow))
2246 { 2237 {
2247 if (p1 >= start) 2238 if (p1 >= start)
2248 *p1 = (dp && XTYPE (DISP_CTRL_GLYPH (dp)) == Lisp_Int 2239 *p1 = (dp && XTYPE (DISP_CTRL_GLYPH (dp)) == Lisp_Int