Commit cbe46e5f authored by Chong Yidong's avatar Chong Yidong
Browse files

Allow clicking mouse-3 on mode line to change coding system.

* lisp/bindings.el (mode-line-coding-system-map): Allow using mouse-3
to invoke set-buffer-file-coding-system.
(mode-line-mule-info-help-echo): Update help text.

Fixes: debbugs:289
parent 383f7350
......@@ -93,6 +93,9 @@ Use "coding: raw-text" instead.
(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'.
* Editing Changes in Emacs 24.2
......@@ -12,6 +12,9 @@
(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 <>
......@@ -88,6 +88,12 @@ corresponding to the mode line clicked."
(when (and enable-multibyte-characters
(describe-coding-system buffer-file-coding-system)))))
(define-key map [mode-line mouse-3]
(lambda (e)
(interactive "e")
(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.")
......@@ -153,7 +159,8 @@ is displayed first.")
(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")))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment