aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-01-21 20:54:57 +0000
committerRichard M. Stallman1994-01-21 20:54:57 +0000
commit76412d64d201962a895a624526d5e303c8565792 (patch)
tree01b70e46d3440d32370512e5534c50626ed64056 /src
parent9c95189beeb5039cfa123b854caef25aeb66c9fc (diff)
downloademacs-76412d64d201962a895a624526d5e303c8565792.tar.gz
emacs-76412d64d201962a895a624526d5e303c8565792.zip
(display_menu_bar): Add USE_X_TOOLKIT conditional.
(redisplay_window) [USE_X_TOOLKIT]: Test FRAME_EXTERNAL_MENU_BAR. (update_menu_bar) [USE_X_TOOLKIT]: Call set_frame_menubar. (truncate_echo_area): New function. (decode_mode_spec) [MSDOS]: Let 't' expand to 'T' for text mode or 'B' for binary mode. (decode_mode_spec) [not subprocesses]: Don't access Fprocess_status.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c41
1 files changed, 40 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 7b554b6f331..c2a492ecbc0 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1,5 +1,5 @@
1/* Display generation from window structure and buffer text. 1/* Display generation from window structure and buffer text.
2 Copyright (C) 1985, 1986, 1987, 1988, 1993 Free Software Foundation, Inc. 2 Copyright (C) 1985, 86, 87, 88, 93, 94 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -35,6 +35,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
35#include "termhooks.h" 35#include "termhooks.h"
36#include "intervals.h" 36#include "intervals.h"
37 37
38#ifdef USE_X_TOOLKIT
39extern void set_frame_menubar ();
40#endif
41
38extern int interrupt_input; 42extern int interrupt_input;
39extern int command_loop_level; 43extern int command_loop_level;
40 44
@@ -283,6 +287,20 @@ message2 (m, len)
283 } 287 }
284} 288}
285 289
290/* Truncate what will be displayed in the echo area
291 the next time we display it--but don't redisplay it now. */
292
293void
294truncate_echo_area (len)
295 int len;
296{
297 /* A null message buffer means that the frame hasn't really been
298 initialized yet. Error messages get reported properly by
299 cmd_error, so this must be just an informative message; toss it. */
300 if (!noninteractive && INTERACTIVE && FRAME_MESSAGE_BUF (selected_frame))
301 echo_area_glyphs_length = len;
302}
303
286/* Nonzero if FRAME_MESSAGE_BUF (selected_frame) is being used by print; 304/* Nonzero if FRAME_MESSAGE_BUF (selected_frame) is being used by print;
287 zero if being used by message. */ 305 zero if being used by message. */
288int message_buf_print; 306int message_buf_print;
@@ -948,6 +966,9 @@ update_menu_bar (window, just_this_one)
948 current_buffer = XBUFFER (w->buffer); 966 current_buffer = XBUFFER (w->buffer);
949 FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (); 967 FRAME_MENU_BAR_ITEMS (f) = menu_bar_items ();
950 current_buffer = prev; 968 current_buffer = prev;
969#ifdef USE_X_TOOLKIT
970 set_frame_menubar (f);
971#endif /* USE_X_TOOLKIT */
951 } 972 }
952 } 973 }
953} 974}
@@ -1263,7 +1284,11 @@ done:
1263 1284
1264 /* When we reach a frame's selected window, redo the frame's menu bar. */ 1285 /* When we reach a frame's selected window, redo the frame's menu bar. */
1265 if (!NILP (w->update_mode_line) 1286 if (!NILP (w->update_mode_line)
1287#ifdef USE_X_TOOLKIT
1288 && FRAME_EXTERNAL_MENU_BAR (f)
1289#else
1266 && FRAME_MENU_BAR_LINES (f) > 0 1290 && FRAME_MENU_BAR_LINES (f) > 0
1291#endif
1267 && EQ (FRAME_SELECTED_WINDOW (f), window)) 1292 && EQ (FRAME_SELECTED_WINDOW (f), window))
1268 display_menu_bar (w); 1293 display_menu_bar (w);
1269 1294
@@ -2349,6 +2374,7 @@ display_menu_bar (w)
2349 int maxendcol = FRAME_WIDTH (f); 2374 int maxendcol = FRAME_WIDTH (f);
2350 int hpos = 0; 2375 int hpos = 0;
2351 2376
2377#ifndef USE_X_TOOLKIT
2352 if (FRAME_MENU_BAR_LINES (f) <= 0) 2378 if (FRAME_MENU_BAR_LINES (f) <= 0)
2353 return; 2379 return;
2354 2380
@@ -2388,6 +2414,7 @@ display_menu_bar (w)
2388 vpos++; 2414 vpos++;
2389 while (vpos < FRAME_MENU_BAR_LINES (f)) 2415 while (vpos < FRAME_MENU_BAR_LINES (f))
2390 get_display_line (f, vpos++, 0); 2416 get_display_line (f, vpos++, 0);
2417#endif /* not USE_X_TOOLKIT */
2391} 2418}
2392 2419
2393/* Display the mode line for window w */ 2420/* Display the mode line for window w */
@@ -2805,9 +2832,21 @@ decode_mode_spec (w, c, maxwidth)
2805 obj = Fget_buffer_process (Fcurrent_buffer ()); 2832 obj = Fget_buffer_process (Fcurrent_buffer ());
2806 if (NILP (obj)) 2833 if (NILP (obj))
2807 return "no process"; 2834 return "no process";
2835#ifdef subprocesses
2808 obj = Fsymbol_name (Fprocess_status (obj)); 2836 obj = Fsymbol_name (Fprocess_status (obj));
2837#endif
2809 break; 2838 break;
2810 2839
2840 case 't': /* indicate TEXT or BINARY */
2841#ifdef MSDOS
2842 decode_mode_spec_buf[0]
2843 = NILP (current_buffer->buffer_file_type) ? "T" : "B";
2844 decode_mode_spec_buf[1] = 0;
2845 return decode_mode_spec_buf;
2846#else /* not MSDOS */
2847 return "T";
2848#endif /* not MSDOS */
2849
2811 case 'p': 2850 case 'p':
2812 { 2851 {
2813 int pos = marker_position (w->start); 2852 int pos = marker_position (w->start);