[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7307: 24.0.50; Mode line had more than just dashes removed
From: |
Stephen Berman |
Subject: |
bug#7307: 24.0.50; Mode line had more than just dashes removed |
Date: |
Sat, 30 Oct 2010 01:05:32 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
This change:
2010-10-18 Julien Danjou <julien@danjou.info>
* bindings.el: Remove end dashes in default mode-line-format.
not only removed the dashes at the end of the mode line, but also the
help string in a tool tip together with the altered mouse pointer, which
serves as a visual cue that the mode line is draggable (with vertically
split windows). I think these help indicators should be restored.
Unfortunately, there is no mode line construct that inserts spaces to
the end of the window like "%-" inserts dashed. So I tried make-string
and it seems to DTRT. The only problem is specifying the length of the
string: (window-width) as the maximum possible length fails here,
because the mode line is constructed before the window-system frame, and
has a value of just 10. So I just picked 200 as a plausible maximum.
Maybe there's a better way, but this seems to work ok.
*** /home/steve/bzr/emacs/trunk/lisp/bindings.el 2010-10-24
13:56:16.000000000 +0200
--- /home/steve/bzr/emacs/quickfixes/lisp/bindings.el 2010-10-30
00:39:06.000000000 +0200
***************
*** 336,342 ****
'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)))))
(standard-mode-line-modes
(list
--- 336,343 ----
'mode-line-modes
`(which-func-mode ("" which-func-format ,spaces))
`(global-mode-string ("" global-mode-string ,spaces))
! `(:eval (if (display-graphic-p)
! ,(propertize (make-string 200 32) 'help-echo help-echo)
,(propertize "-%-" 'help-echo help-echo)))))
(standard-mode-line-modes
(list