]> git.eshelyaron.com Git - emacs.git/commitdiff
(mode-line-mule-info): Fix/extend last change.
authorDave Love <fx@gnu.org>
Fri, 4 Feb 2000 20:35:08 +0000 (20:35 +0000)
committerDave Love <fx@gnu.org>
Fri, 4 Feb 2000 20:35:08 +0000 (20:35 +0000)
lisp/ChangeLog
lisp/bindings.el

index 9a9aac145c061b166954990179e911e27e5005c0..0b5166ae8c3db9278702ee5d2d208a21f423bdc8 100644 (file)
@@ -1,5 +1,7 @@
 2000-02-04  Dave Love  <fx@gnu.org>
 
+       * bindings.el (mode-line-mule-info): Fix/extend last change.
+
        * completion.el: Replace completion-dolist with dolist.
 
        * tar-mode.el: Replace tar-dolist, tar-dotimes with dolist,
index 113ce20ee3e98c212bae9e304ec075e779135c37..9477e91f2fb831cd5b1893240745fa3c4fc5e1c0 100644 (file)
@@ -1,6 +1,7 @@
 ;;; bindings.el --- define standard key bindings and some variables.
 
-;; Copyright (C) 1985,86,87,92,93,94,95,96,99 Free Software Foundation, Inc.
+;; Copyright (C) 1985,86,87,92,93,94,95,96,99,2000
+;;   Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: internal
@@ -61,13 +62,37 @@ corresponding to the mode line clicked."
           (force-mode-line-update))))
     map))
 
-;; This might have a local-map to bring up a MULE menu or describe the
-;; current method.  At least give the user a clue what the field is.
 (defvar mode-line-mule-info
   `(""
-    (current-input-method ("" (propertize current-input-method-title
-                                         'help-echo "Input method")))
-    ,(propertize "%Z" 'help-echo (purecopy "Coding system information")))
+    (current-input-method
+     ("" (:eval
+         (if current-input-method
+             (propertize
+              current-input-method-title
+              'help-echo (concat ,(purecopy "Input method: ")
+                                 current-input-method
+                                 ".  mouse-2 toggles, mouse-3 describes")
+              'local-map ,(purecopy
+                           (let ((map (make-sparse-keymap)))
+                             (define-key map [mode-line mouse-2]
+                               (lambda (e)
+                                 (interactive "e")
+                                 (save-selected-window
+                                   (select-window
+                                    (posn-window (event-start e)))
+                                   (toggle-input-method)
+                                   (force-mode-line-update))))
+                             (define-key map [mode-line mouse-3]
+                               (lambda (e)
+                                 (interactive "e")
+                                 (save-selected-window
+                                   (select-window
+                                    (posn-window (event-start e)))
+                                   (describe-input-method))))
+                             map)))))))
+    ,(propertize
+      "%Z" 'help-echo
+      (purecopy "Coding system information: see M-x describe-coding-system")))
   "Mode-line control for displaying information of multilingual environment.
 Normally it displays current input method (if any activated) and
 mnemonics of the following coding systems: