mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
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
This commit is contained in:
parent
383f7350f3
commit
cbe46e5fae
3
etc/NEWS
3
etc/NEWS
@ -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 <monnier@iro.umontreal.ca>
|
||||
|
||||
|
@ -88,6 +88,12 @@ corresponding to the mode line clicked."
|
||||
(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.")
|
||||
|
||||
@ -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")))
|
||||
|
Loading…
Reference in New Issue
Block a user