(shown in a tooltip or in the echo area) for any part of the mode line
that does not have its own specialized help text.
+*** You can now click mouse-3 in the coding system indicator to
+invokes `set-buffer-file-coding-system'.
+
\f
* Editing Changes in Emacs 24.2
(mode-line-mule-info, mode-line-modified): Use them.
(mode-line-eol-desc, propertized-buffer-identification):
Consistency fixes for help text.
+ (mode-line-coding-system-map): Allow using mouse-3 to invoke
+ set-buffer-file-coding-system (Bug#289).
+ (mode-line-mule-info-help-echo): Update help text.
2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
(when (and enable-multibyte-characters
buffer-file-coding-system)
(describe-coding-system buffer-file-coding-system)))))
+ (define-key map [mode-line mouse-3]
+ (lambda (e)
+ (interactive "e")
+ (save-selected-window
+ (select-window (posn-window (event-start e)))
+ (call-interactively 'set-buffer-file-coding-system))))
(purecopy map))
"Local keymap for the coding-system part of the mode line.")
(with-current-buffer (window-buffer window)
(if buffer-file-coding-system
(format "Buffer coding system (%s): %s
-mouse-1: Describe coding system"
+mouse-1: Describe coding system
+mouse-3: Set coding system"
(if enable-multibyte-characters "multi-byte" "unibyte")
(symbol-name buffer-file-coding-system))
"Buffer coding system: none specified")))