# HG changeset patch # User Gerd Moellmann # Date 999181152 0 # Node ID e178a1e23722edf26e4de61b11a451751c523208 # Parent 9ce039b7595be65b5a01f0009f921fddbe8e9f6a (mode-line-coding-system-map): New variable. (mode-line-mule-info): Give the "%Z" a local-map keymap. diff -r 9ce039b7595b -r e178a1e23722 lisp/bindings.el --- a/lisp/bindings.el Thu Aug 30 13:36:24 2001 +0000 +++ b/lisp/bindings.el Thu Aug 30 14:19:12 2001 +0000 @@ -120,6 +120,21 @@ (describe-current-input-method)))) (purecopy map))) + +(defvar mode-line-coding-system-map + (let ((map (make-sparse-keymap))) + (define-key map [mode-line mouse-3] + (lambda (e) + (interactive "e") + (save-selected-window + (select-window (posn-window (event-start e))) + (when (and enable-multibyte-characters + buffer-file-coding-system) + (describe-coding-system buffer-file-coding-system))))) + (purecopy map)) + "Local keymap for the coding-system part of the mode line.") + + (defvar mode-line-mule-info `("" (current-input-method @@ -129,7 +144,7 @@ 'help-echo (concat "Input method: " current-input-method - ". mouse-2 disables, mouse-3 describes") + ". mouse-2: disable, mouse-3: describe") 'local-map mode-line-input-method-map)))) ,(propertize "%Z" @@ -142,10 +157,11 @@ (when buffer-file-coding-system (if enable-multibyte-characters (concat (symbol-name buffer-file-coding-system) - " buffer; see M-x describe-coding-system") + " buffer; mouse-3: describe coding system") (concat "Unibyte " (symbol-name buffer-file-coding-system) - " buffer")))))))) + " buffer")))))) + 'local-map mode-line-coding-system-map)) "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: