[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
calendar-set-mode-line doesn't center STR properly
From: |
Bertil Askelid |
Subject: |
calendar-set-mode-line doesn't center STR properly |
Date: |
Tue, 4 Jun 2002 13:33:51 -0700 |
This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.
In GNU Emacs 21.2.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2002-04-08 on porky.devel.redhat.com
configured using `configure i386-redhat-linux --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man
--infodir=/usr/share/info --with-gcc --with-pop --with-sound'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.iso885915
locale-coding-system: iso-latin-9
default-enable-multibyte-characters: nil
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
`calendar-set-mode-line' doesn't center the STR properly. It looks
at `frame-width' to decide the number of padding "-" to use. However,
it then splits the frame in two horizontal windows. Better to use:
(defun calendar-set-mode-line (str)
"Set mode line to STR, centered, surrounded by dashes."
(setq mode-line-format
(calendar-string-spread (list str) ?- (/ (frame-width) 2))))
Best would be to use the actual `window-width', but at the time
`calendar-set-mode-line' is called it only sees the frame with one
window.
Recent input:
<C-down-mouse-1> <C-mouse-1> M-3 <switch-frame> C-y
C-n C-e <switch-frame> <C-down-mouse-1> <C-mouse-1>
M-3 <switch-frame> C-y C-e <switch-frame> <C-down-mouse-1>
<C-mouse-1> C-a M-" M-w <switch-frame> C-y <f14> M-"
C-y C-z C-c <switch-frame> C-z C-k <switch-frame> <switch-frame>
<switch-frame> <switch-frame> <help-echo> <down-mouse-2>
<mouse-2> y <f14> C-z C-k D y g = y C-z C-k <switch-frame>
<switch-frame> <switch-frame> <switch-frame> C-z C-k
<switch-frame> <switch-frame> C-z RET <switch-frame>
<switch-frame> <switch-frame> <switch-frame> <switch-frame>
<switch-frame> C-a / C-d C-z \ <switch-frame> <switch-frame>
M-x M-p M-p M-p M-p M-p M-p M-p M-p M-p M-p M-p M-p
M-p M-p M-n M-n M-n M-n M-p M-p M-p M-p M-3 C-x x x
C-e <return>
Recent messages:
Counting messages...done
(Next local Ispell command will use svenska dictionary)
(No new mail has arrived)
next-history-element: Beginning of history; no preceding item
^ line rest [2 times]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- calendar-set-mode-line doesn't center STR properly,
Bertil Askelid <=