* bug#11226: format-mode-line, %z, mode-line-mule-info, and unibyte
@ 2012-04-11 19:16 Glenn Morris
2012-06-03 10:24 ` Chong Yidong
0 siblings, 1 reply; 2+ messages in thread
From: Glenn Morris @ 2012-04-11 19:16 UTC (permalink / raw)
To: 11226
Package: emacs
Version: 24.0.95
mode-line-mule-info contains this:
(propertize
"%z" 'help-echo [...]
(format "Buffer coding system %s\nmouse-1: describe coding system"
(if enable-multibyte-characters
(concat "(multi-byte): "
(symbol-name buffer-file-coding-system))
(concat "(unibyte): "
(symbol-name buffer-file-coding-system))))
The intent is obviously that you see (multibyte) in the mode-line
tooltip in a multibyte buffer, and (unibyte) otherwise.
However, you will never see the unibyte tooltip, because:
(set-buffer-multibyte nil)
(format-mode-line "%z")
-> ""
ie, the empty string, so there is nowhere for the help-echo to display.
Compare with "-" in multibyte buffers.
If it returned " " instead of "", you would see the tooltip.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#11226: format-mode-line, %z, mode-line-mule-info, and unibyte
2012-04-11 19:16 bug#11226: format-mode-line, %z, mode-line-mule-info, and unibyte Glenn Morris
@ 2012-06-03 10:24 ` Chong Yidong
0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2012-06-03 10:24 UTC (permalink / raw)
To: Glenn Morris; +Cc: 11226
Glenn Morris <rgm@gnu.org> writes:
> The intent is obviously that you see (multibyte) in the mode-line
> tooltip in a multibyte buffer, and (unibyte) otherwise.
>
> However, you will never see the unibyte tooltip, because:
>
> (set-buffer-multibyte nil)
> (format-mode-line "%z")
> -> ""
>
> If it returned " " instead of "", you would see the tooltip.
Sounds reasonable; fixed in trunk.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-03 10:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-11 19:16 bug#11226: format-mode-line, %z, mode-line-mule-info, and unibyte Glenn Morris
2012-06-03 10:24 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.