emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r108466: Allow clicking mouse-3 on mo


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108466: Allow clicking mouse-3 on mode line to change coding system.
Date: Sun, 03 Jun 2012 18:54:22 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108466
fixes bug: http://debbugs.gnu.org/289
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2012-06-03 18:54:22 +0800
message:
  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.
modified:
  etc/NEWS
  lisp/ChangeLog
  lisp/bindings.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2012-06-03 10:23:49 +0000
+++ b/etc/NEWS  2012-06-03 10:54:22 +0000
@@ -93,6 +93,9 @@
 (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
 

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-03 10:23:49 +0000
+++ b/lisp/ChangeLog    2012-06-03 10:54:22 +0000
@@ -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  <address@hidden>
 

=== modified file 'lisp/bindings.el'
--- a/lisp/bindings.el  2012-06-03 10:23:49 +0000
+++ b/lisp/bindings.el  2012-06-03 10:54:22 +0000
@@ -88,6 +88,12 @@
          (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 @@
   (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")))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]