aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1991-07-31 17:51:28 +0000
committerJim Blandy1991-07-31 17:51:28 +0000
commit6e8290aada30afd252649ef7cc412af6379c077c (patch)
tree46f1342be5be918c245e089471a24eec7bc7d34c /src
parent6f8e447f09b1683a07b155eba4b218fbeae4183b (diff)
downloademacs-6e8290aada30afd252649ef7cc412af6379c077c.tar.gz
emacs-6e8290aada30afd252649ef7cc412af6379c077c.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c5
-rw-r--r--src/xdisp.c76
2 files changed, 61 insertions, 20 deletions
diff --git a/src/keymap.c b/src/keymap.c
index 7aeed24ce4b..344b600a6be 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -401,7 +401,10 @@ DEF is anything that can be a key's definition:\n\
401 or another symbol whose function definition is used, etc.\n\ 401 or another symbol whose function definition is used, etc.\n\
402 a cons (STRING . DEFN), meaning that DEFN is the definition\n\ 402 a cons (STRING . DEFN), meaning that DEFN is the definition\n\
403 (DEFN should be a valid definition in its own right),\n\ 403 (DEFN should be a valid definition in its own right),\n\
404 or a cons (KEYMAP . CHAR), meaning use definition of CHAR in map KEYMAP.") 404 or a cons (KEYMAP . CHAR), meaning use definition of CHAR in map KEYMAP.\n\
405\n\
406If KEYMAP is a sparse keymap, the pair binding KEY to DEF is added at\n\
407the front of KEYMAP.")
405 (keymap, key, def) 408 (keymap, key, def)
406 register Lisp_Object keymap; 409 register Lisp_Object keymap;
407 Lisp_Object key; 410 Lisp_Object key;
diff --git a/src/xdisp.c b/src/xdisp.c
index 40c9c9c1ded..ab0185a0789 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -211,7 +211,10 @@ message (m, a1, a2, a3)
211 fprintf (stderr, "\n"); 211 fprintf (stderr, "\n");
212 fflush (stderr); 212 fflush (stderr);
213 } 213 }
214 else if (INTERACTIVE) 214 /* A null message buffer means that the screen hasn't really been
215 initialized yet. Error messages get trapped by the condition-case
216 in command-line, so this must be just an informative message; toss it. */
217 else if (INTERACTIVE && SCREEN_MESSAGE_BUF (selected_screen))
215 { 218 {
216#ifdef NO_ARG_ARRAY 219#ifdef NO_ARG_ARRAY
217 int a[3]; 220 int a[3];
@@ -224,7 +227,7 @@ message (m, a1, a2, a3)
224#else 227#else
225 doprnt (SCREEN_MESSAGE_BUF (selected_screen), 228 doprnt (SCREEN_MESSAGE_BUF (selected_screen),
226 SCREEN_WIDTH (selected_screen), m, 0, 3, &a1); 229 SCREEN_WIDTH (selected_screen), m, 0, 3, &a1);
227#endif /* NO_ARG_ARRAY */ 230#endif /* NO_ARG_ARRAY */
228 231
229 echo_area_glyphs = SCREEN_MESSAGE_BUF (selected_screen); 232 echo_area_glyphs = SCREEN_MESSAGE_BUF (selected_screen);
230 233
@@ -244,6 +247,9 @@ void
244message1 (m) 247message1 (m)
245 char *m; 248 char *m;
246{ 249{
250 /* A null message buffer means that the screen hasn't really been
251 initialized yet; write the error message on the standard error
252 as if we were non-interactive. */
247 if (noninteractive) 253 if (noninteractive)
248 { 254 {
249 if (noninteractive_need_newline) 255 if (noninteractive_need_newline)
@@ -252,7 +258,10 @@ message1 (m)
252 fprintf (stderr, "%s\n", m); 258 fprintf (stderr, "%s\n", m);
253 fflush (stderr); 259 fflush (stderr);
254 } 260 }
255 else if (INTERACTIVE) 261 /* A null message buffer means that the screen hasn't really been
262 initialized yet. Error messages get trapped by the condition-case
263 in command-line, so this must be just an informative message; toss it. */
264 else if (INTERACTIVE && SCREEN_MESSAGE_BUF (selected_screen))
256 { 265 {
257 echo_area_glyphs = m; 266 echo_area_glyphs = m;
258 do_pending_window_change (); 267 do_pending_window_change ();
@@ -341,6 +350,10 @@ redisplay ()
341 screen_garbaged = 0; 350 screen_garbaged = 0;
342 } 351 }
343 352
353 /* Normally the message* functions will have already displayed and
354 updated the echo area, but the screen may have been trashed, or
355 the update may have been preempted, so display the echo area
356 again here. */
344 if (echo_area_glyphs || previous_echo_glyphs) 357 if (echo_area_glyphs || previous_echo_glyphs)
345 { 358 {
346 echo_area_display (); 359 echo_area_display ();
@@ -362,10 +375,6 @@ redisplay ()
362 SCREEN_SCROLL_BOTTOM_VPOS (XSCREEN (w->screen)) = -1; 375 SCREEN_SCROLL_BOTTOM_VPOS (XSCREEN (w->screen)) = -1;
363 376
364 all_windows = update_mode_lines || buffer_shared > 1; 377 all_windows = update_mode_lines || buffer_shared > 1;
365#ifdef MULTI_SCREEN
366 all_windows |= (XTYPE (Vglobal_minibuffer_screen) == Lisp_Screen
367 && selected_screen != XSCREEN (Vglobal_minibuffer_screen));
368#endif /* MULTI_SCREEN */
369 378
370 /* If specs for an arrow have changed, do thorough redisplay 379 /* If specs for an arrow have changed, do thorough redisplay
371 to ensure we remove any arrow that should no longer exist. */ 380 to ensure we remove any arrow that should no longer exist. */
@@ -533,8 +542,25 @@ update:
533 } 542 }
534 else 543 else
535#endif /* MULTI_SCREEN */ 544#endif /* MULTI_SCREEN */
536 if (SCREEN_VISIBLE_P (selected_screen)) 545 {
537 pause = update_screen (selected_screen, 0, 0); 546 if (SCREEN_VISIBLE_P (selected_screen))
547 pause = update_screen (selected_screen, 0, 0);
548#ifdef MULTI_SCREEN
549
550 /* We called echo_area_display at the top of this function. If
551 the echo area is on another screen, that may have put text on
552 a screen other than the selected one, so the above call to
553 update_screen would not have caught it. Catch it here. */
554 if (echo_area_glyphs || previous_echo_glyphs)
555 {
556 SCREEN_PTR mini_screen =
557 XSCREEN (WINDOW_SCREEN (XWINDOW (minibuf_window)));
558
559 if (mini_screen != selected_screen)
560 pause |= update_screen (mini_screen, 0, 0);
561 }
562#endif
563 }
538 564
539 /* If screen does not match, prevent doing single-line-update next time. 565 /* If screen does not match, prevent doing single-line-update next time.
540 Also, don't forget to check every line to update the arrow. */ 566 Also, don't forget to check every line to update the arrow. */
@@ -1013,7 +1039,19 @@ try_window_id (window)
1013 beg_unchanged + 1, 10000, 10000, width, hscroll, 1039 beg_unchanged + 1, 10000, 10000, width, hscroll,
1014 pos_tab_offset (w, start)); 1040 pos_tab_offset (w, start));
1015 if (bp.vpos >= height) 1041 if (bp.vpos >= height)
1016 return point < bp.bufpos && !bp.contin; 1042 {
1043 if (point < bp.bufpos && !bp.contin)
1044 {
1045 /* All changes are below the screen, and point is on the screen.
1046 We don't need to change the screen at all.
1047 But we need to update window_end_pos to account for
1048 any change in buffer size. */
1049 XFASTINT (w->window_end_vpos) = height;
1050 XFASTINT (w->window_end_pos) = Z - bp.bufpos;
1051 return 1;
1052 }
1053 return 0;
1054 }
1017 1055
1018 vpos = bp.vpos; 1056 vpos = bp.vpos;
1019 1057
@@ -1496,7 +1534,7 @@ display_text_line (w, start, vpos, hpos, taboffset)
1496 while ((p1 - startp + taboffset + hscroll - (hscroll > 0)) 1534 while ((p1 - startp + taboffset + hscroll - (hscroll > 0))
1497 % tab_width); 1535 % tab_width);
1498 } 1536 }
1499 else if (c == Ctl('M') && selective == -1) 1537 else if (c == Ctl ('M') && selective == -1)
1500 { 1538 {
1501 pos = find_next_newline (pos, 1); 1539 pos = find_next_newline (pos, 1);
1502 if (FETCH_CHAR (pos - 1) == '\n') 1540 if (FETCH_CHAR (pos - 1) == '\n')
@@ -1521,7 +1559,7 @@ display_text_line (w, start, vpos, hpos, taboffset)
1521 *p1 = (dp && XTYPE (DISP_CTRL_GLYPH (dp)) == Lisp_Int 1559 *p1 = (dp && XTYPE (DISP_CTRL_GLYPH (dp)) == Lisp_Int
1522 ? XINT (DISP_CTRL_GLYPH (dp)) : '^'); 1560 ? XINT (DISP_CTRL_GLYPH (dp)) : '^');
1523 p1++; 1561 p1++;
1524 if (p1 >= startp) 1562 if (p1 >= startp && p1 < endp)
1525 *p1 = c ^ 0100; 1563 *p1 = c ^ 0100;
1526 p1++; 1564 p1++;
1527 } 1565 }
@@ -1531,13 +1569,13 @@ display_text_line (w, start, vpos, hpos, taboffset)
1531 *p1 = (dp && XTYPE (DISP_ESCAPE_GLYPH (dp)) == Lisp_Int 1569 *p1 = (dp && XTYPE (DISP_ESCAPE_GLYPH (dp)) == Lisp_Int
1532 ? XINT (DISP_ESCAPE_GLYPH (dp)) : '\\'); 1570 ? XINT (DISP_ESCAPE_GLYPH (dp)) : '\\');
1533 p1++; 1571 p1++;
1534 if (p1 >= startp) 1572 if (p1 >= startp && p1 < endp)
1535 *p1 = (c >> 6) + '0'; 1573 *p1 = (c >> 6) + '0';
1536 p1++; 1574 p1++;
1537 if (p1 >= startp) 1575 if (p1 >= startp && p1 < endp)
1538 *p1 = (7 & (c >> 3)) + '0'; 1576 *p1 = (7 & (c >> 3)) + '0';
1539 p1++; 1577 p1++;
1540 if (p1 >= startp) 1578 if (p1 >= startp && p1 < endp)
1541 *p1 = (7 & c) + '0'; 1579 *p1 = (7 & c) + '0';
1542 p1++; 1580 p1++;
1543 } 1581 }
@@ -2170,7 +2208,7 @@ display_string (w, vpos, string, hpos, truncate, mincol, maxcol)
2170 *p1 = (dp && XTYPE (DISP_CTRL_GLYPH (dp)) == Lisp_Int 2208 *p1 = (dp && XTYPE (DISP_CTRL_GLYPH (dp)) == Lisp_Int
2171 ? XINT (DISP_CTRL_GLYPH (dp)) : '^'); 2209 ? XINT (DISP_CTRL_GLYPH (dp)) : '^');
2172 p1++; 2210 p1++;
2173 if (p1 >= start) 2211 if (p1 >= start && p1 < end)
2174 *p1 = c ^ 0100; 2212 *p1 = c ^ 0100;
2175 p1++; 2213 p1++;
2176 } 2214 }
@@ -2180,13 +2218,13 @@ display_string (w, vpos, string, hpos, truncate, mincol, maxcol)
2180 *p1 = (dp && XTYPE (DISP_ESCAPE_GLYPH (dp)) == Lisp_Int 2218 *p1 = (dp && XTYPE (DISP_ESCAPE_GLYPH (dp)) == Lisp_Int
2181 ? XINT (DISP_ESCAPE_GLYPH (dp)) : '\\'); 2219 ? XINT (DISP_ESCAPE_GLYPH (dp)) : '\\');
2182 p1++; 2220 p1++;
2183 if (p1 >= start) 2221 if (p1 >= start && p1 < end)
2184 *p1 = (c >> 6) + '0'; 2222 *p1 = (c >> 6) + '0';
2185 p1++; 2223 p1++;
2186 if (p1 >= start) 2224 if (p1 >= start && p1 < end)
2187 *p1 = (7 & (c >> 3)) + '0'; 2225 *p1 = (7 & (c >> 3)) + '0';
2188 p1++; 2226 p1++;
2189 if (p1 >= start) 2227 if (p1 >= start && p1 < end)
2190 *p1 = (7 & c) + '0'; 2228 *p1 = (7 & c) + '0';
2191 p1++; 2229 p1++;
2192 } 2230 }