=== modified file 'lisp/bindings.el' --- lisp/bindings.el 2010-10-19 19:20:33 +0000 +++ lisp/bindings.el 2010-11-19 11:27:06 +0000 @@ -336,8 +336,7 @@ 'mode-line-modes `(which-func-mode ("" which-func-format ,spaces)) `(global-mode-string ("" global-mode-string ,spaces)) - `(:eval (unless (display-graphic-p) - ,(propertize "-%-" 'help-echo help-echo))))) + `(:eval ,(propertize "%-" 'help-echo help-echo)))) (standard-mode-line-modes (list (propertize "%[" 'help-echo recursive-edit-help-echo) === modified file 'lisp/cus-start.el' --- lisp/cus-start.el 2010-10-31 22:47:12 +0000 +++ lisp/cus-start.el 2010-11-20 19:52:54 +0000 @@ -397,6 +397,15 @@ (truncate-partial-width-windows display boolean "23.1") (mode-line-inverse-video mode-line boolean) (mode-line-in-non-selected-windows mode-line boolean "22.1") + (mode-line-filler mode-line + (choice + (character :tag "Character") + (integer :tag "Integer char value" + ;; :validate ruler-mode-character-validate + )) + "24.1" + :standard (if (display-graphic-p) ? ?-) + :initialize custom-initialize-delay) (line-number-display-limit display (choice integer (const :tag "No limit" nil))) === modified file 'src/xdisp.c' --- src/xdisp.c 2010-11-09 20:07:10 +0000 +++ src/xdisp.c 2010-11-19 22:13:02 +0000 @@ -667,6 +667,11 @@ int cursor_type_changed; +/* Filler character used by the "%-" mode line spec. Defaults to ' ' + on a graphical display and to '-' on a tty. */ + +EMACS_INT mode_line_filler; + /* Nonzero after display_mode_line if %l was used and it displayed a line number. */ @@ -19382,8 +19387,6 @@ Note we operate on the current buffer for most purposes, the exception being w->base_line_pos. */ -static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------"; - static const char * decode_mode_spec (struct window *w, register int c, int field_width, int precision, Lisp_Object *string) @@ -19453,21 +19456,21 @@ case '-': { register int i; - - /* Let lots_of_dashes be a string of infinite length. */ - if (mode_line_target == MODE_LINE_NOPROP || - mode_line_target == MODE_LINE_STRING) - return "--"; - if (field_width <= 0 - || field_width > sizeof (lots_of_dashes)) - { - for (i = 0; i < FRAME_MESSAGE_BUF_SIZE (f) - 1; ++i) - decode_mode_spec_buf[i] = '-'; - decode_mode_spec_buf[i] = '\0'; - return decode_mode_spec_buf; - } - else - return lots_of_dashes; + int fill_len; + int lots_of_filler = 140; + + /* Make a string of mode_line_filler characters. */ + fill_len = + (mode_line_target == MODE_LINE_NOPROP + || mode_line_target == MODE_LINE_STRING) + ? 2 + : ((field_width <= 0 || field_width > lots_of_filler) + ? FRAME_MESSAGE_BUF_SIZE (f) - 1 + : lots_of_filler); + for (i = 0; i < fill_len; ++i) + decode_mode_spec_buf[i] = mode_line_filler; + decode_mode_spec_buf[i] = '\0'; + return decode_mode_spec_buf; } case 'b': @@ -26654,6 +26657,10 @@ doc: /* String (or mode line construct) included (normally) in `mode-line-format'. */); Vglobal_mode_string = Qnil; + DEFVAR_INT ("mode-line-filler", &mode_line_filler, + doc: /* Filler character used by the "%-" mode line spec. +Defaults to ' ' on a graphical display and to '-' on a tty. */); + DEFVAR_LISP ("overlay-arrow-position", &Voverlay_arrow_position, doc: /* Marker for where to display an arrow on top of the buffer text. This must be the beginning of a line in order to work.