aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-04-08 04:31:45 +0000
committerRichard M. Stallman1995-04-08 04:31:45 +0000
commit1af9f229f1c514bb5f4fb9eb869b3899acb3f2fc (patch)
tree53308cacb54f74aad122e403f12f46c9358dc2c0 /src
parent53631723061b209893fe44016d3a8018e30a0094 (diff)
downloademacs-1af9f229f1c514bb5f4fb9eb869b3899acb3f2fc.tar.gz
emacs-1af9f229f1c514bb5f4fb9eb869b3899acb3f2fc.zip
(redisplay): Don't call update_frame for non-selected termcap frame.
(decode_mode_spec): Add %F code. Order alternatives alphabetically.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c190
1 files changed, 98 insertions, 92 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 833f9083511..28db5d3bd2a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1011,7 +1011,9 @@ update:
1011 continue; 1011 continue;
1012 1012
1013 f = XFRAME (XCONS (tail)->car); 1013 f = XFRAME (XCONS (tail)->car);
1014 if (FRAME_VISIBLE_P (f)) 1014
1015 if ((! FRAME_TERMCAP_P (f) || f == selected_frame)
1016 && FRAME_VISIBLE_P (f))
1015 { 1017 {
1016 pause |= update_frame (f, 0, 0); 1018 pause |= update_frame (f, 0, 0);
1017 if (!pause) 1019 if (!pause)
@@ -3271,6 +3273,74 @@ decode_mode_spec (w, c, maxwidth)
3271 3273
3272 switch (c) 3274 switch (c)
3273 { 3275 {
3276 case '*':
3277 if (!NILP (b->read_only))
3278 return "%";
3279 if (BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
3280 return "*";
3281 return "-";
3282
3283 case '+':
3284 /* This differs from %* only for a modified read-only buffer. */
3285 if (BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
3286 return "*";
3287 if (!NILP (b->read_only))
3288 return "%";
3289 return "-";
3290
3291 case '&':
3292 /* This differs from %* in ignoring read-only-ness. */
3293 if (BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
3294 return "*";
3295 return "-";
3296
3297 case '%':
3298 return "%";
3299
3300 case '[':
3301 {
3302 int i;
3303 char *p;
3304
3305 if (command_loop_level > 5)
3306 return "[[[... ";
3307 p = decode_mode_spec_buf;
3308 for (i = 0; i < command_loop_level; i++)
3309 *p++ = '[';
3310 *p = 0;
3311 return decode_mode_spec_buf;
3312 }
3313
3314 case ']':
3315 {
3316 int i;
3317 char *p;
3318
3319 if (command_loop_level > 5)
3320 return " ...]]]";
3321 p = decode_mode_spec_buf;
3322 for (i = 0; i < command_loop_level; i++)
3323 *p++ = ']';
3324 *p = 0;
3325 return decode_mode_spec_buf;
3326 }
3327
3328 case '-':
3329 {
3330 register char *p;
3331 register int i;
3332
3333 if (maxwidth < sizeof (lots_of_dashes))
3334 return lots_of_dashes;
3335 else
3336 {
3337 for (p = decode_mode_spec_buf, i = maxwidth; i > 0; i--)
3338 *p++ = '-';
3339 *p = '\0';
3340 }
3341 return decode_mode_spec_buf;
3342 }
3343
3274 case 'b': 3344 case 'b':
3275 obj = b->name; 3345 obj = b->name;
3276#if 0 3346#if 0
@@ -3284,6 +3354,18 @@ decode_mode_spec (w, c, maxwidth)
3284#endif 3354#endif
3285 break; 3355 break;
3286 3356
3357 case 'c':
3358 {
3359 int col = current_column ();
3360 XSETFASTINT (w->column_number_displayed, col);
3361 sprintf (decode_mode_spec_buf, "%d", col);
3362 return decode_mode_spec_buf;
3363 }
3364
3365 case 'F':
3366 /* %F displays the frame name. */
3367 return (char *) XSTRING (selected_frame->name)->data;
3368
3287 case 'f': 3369 case 'f':
3288 obj = b->filename; 3370 obj = b->filename;
3289#if 0 3371#if 0
@@ -3299,14 +3381,6 @@ decode_mode_spec (w, c, maxwidth)
3299#endif 3381#endif
3300 break; 3382 break;
3301 3383
3302 case 'c':
3303 {
3304 int col = current_column ();
3305 XSETFASTINT (w->column_number_displayed, col);
3306 sprintf (decode_mode_spec_buf, "%d", col);
3307 return decode_mode_spec_buf;
3308 }
3309
3310 case 'l': 3384 case 'l':
3311 { 3385 {
3312 int startpos = marker_position (w->start); 3386 int startpos = marker_position (w->start);
@@ -3403,44 +3477,6 @@ decode_mode_spec (w, c, maxwidth)
3403 return " Narrow"; 3477 return " Narrow";
3404 break; 3478 break;
3405 3479
3406 case '*':
3407 if (!NILP (b->read_only))
3408 return "%";
3409 if (BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
3410 return "*";
3411 return "-";
3412
3413 case '+':
3414 /* This differs from %* only for a modified read-only buffer. */
3415 if (BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
3416 return "*";
3417 if (!NILP (b->read_only))
3418 return "%";
3419 return "-";
3420
3421 case '&':
3422 /* This differs from %* in ignoring read-only-ness. */
3423 if (BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
3424 return "*";
3425 return "-";
3426
3427 case 's':
3428 /* status of process */
3429 obj = Fget_buffer_process (w->buffer);
3430 if (NILP (obj))
3431 return "no process";
3432#ifdef subprocesses
3433 obj = Fsymbol_name (Fprocess_status (obj));
3434#endif
3435 break;
3436
3437 case 't': /* indicate TEXT or BINARY */
3438#ifdef MODE_LINE_BINARY_TEXT
3439 return MODE_LINE_BINARY_TEXT (b);
3440#else
3441 return "T";
3442#endif
3443
3444 case 'p': 3480 case 'p':
3445 { 3481 {
3446 int pos = marker_position (w->start); 3482 int pos = marker_position (w->start);
@@ -3496,52 +3532,22 @@ decode_mode_spec (w, c, maxwidth)
3496 } 3532 }
3497 } 3533 }
3498 3534
3499 case '%': 3535 case 's':
3500 return "%"; 3536 /* status of process */
3501 3537 obj = Fget_buffer_process (w->buffer);
3502 case '[': 3538 if (NILP (obj))
3503 { 3539 return "no process";
3504 int i; 3540#ifdef subprocesses
3505 char *p; 3541 obj = Fsymbol_name (Fprocess_status (obj));
3506 3542#endif
3507 if (command_loop_level > 5) 3543 break;
3508 return "[[[... ";
3509 p = decode_mode_spec_buf;
3510 for (i = 0; i < command_loop_level; i++)
3511 *p++ = '[';
3512 *p = 0;
3513 return decode_mode_spec_buf;
3514 }
3515
3516 case ']':
3517 {
3518 int i;
3519 char *p;
3520
3521 if (command_loop_level > 5)
3522 return " ...]]]";
3523 p = decode_mode_spec_buf;
3524 for (i = 0; i < command_loop_level; i++)
3525 *p++ = ']';
3526 *p = 0;
3527 return decode_mode_spec_buf;
3528 }
3529 3544
3530 case '-': 3545 case 't': /* indicate TEXT or BINARY */
3531 { 3546#ifdef MODE_LINE_BINARY_TEXT
3532 register char *p; 3547 return MODE_LINE_BINARY_TEXT (b);
3533 register int i; 3548#else
3534 3549 return "T";
3535 if (maxwidth < sizeof (lots_of_dashes)) 3550#endif
3536 return lots_of_dashes;
3537 else
3538 {
3539 for (p = decode_mode_spec_buf, i = maxwidth; i > 0; i--)
3540 *p++ = '-';
3541 *p = '\0';
3542 }
3543 return decode_mode_spec_buf;
3544 }
3545 } 3551 }
3546 3552
3547 if (STRINGP (obj)) 3553 if (STRINGP (obj))