Mercurial > emacs
comparison lisp/bindings.el @ 39037:e178a1e23722
(mode-line-coding-system-map): New variable.
(mode-line-mule-info): Give the "%Z" a local-map keymap.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 30 Aug 2001 14:19:12 +0000 |
parents | 5653fe43d6fb |
children | 9c6da1aac3fd |
comparison
equal
deleted
inserted
replaced
39036:9ce039b7595b | 39037:e178a1e23722 |
---|---|
118 (select-window | 118 (select-window |
119 (posn-window (event-start e))) | 119 (posn-window (event-start e))) |
120 (describe-current-input-method)))) | 120 (describe-current-input-method)))) |
121 (purecopy map))) | 121 (purecopy map))) |
122 | 122 |
123 | |
124 (defvar mode-line-coding-system-map | |
125 (let ((map (make-sparse-keymap))) | |
126 (define-key map [mode-line mouse-3] | |
127 (lambda (e) | |
128 (interactive "e") | |
129 (save-selected-window | |
130 (select-window (posn-window (event-start e))) | |
131 (when (and enable-multibyte-characters | |
132 buffer-file-coding-system) | |
133 (describe-coding-system buffer-file-coding-system))))) | |
134 (purecopy map)) | |
135 "Local keymap for the coding-system part of the mode line.") | |
136 | |
137 | |
123 (defvar mode-line-mule-info | 138 (defvar mode-line-mule-info |
124 `("" | 139 `("" |
125 (current-input-method | 140 (current-input-method |
126 (:eval | 141 (:eval |
127 ,(purecopy | 142 ,(purecopy |
128 '(propertize current-input-method-title | 143 '(propertize current-input-method-title |
129 'help-echo (concat | 144 'help-echo (concat |
130 "Input method: " | 145 "Input method: " |
131 current-input-method | 146 current-input-method |
132 ". mouse-2 disables, mouse-3 describes") | 147 ". mouse-2: disable, mouse-3: describe") |
133 'local-map mode-line-input-method-map)))) | 148 'local-map mode-line-input-method-map)))) |
134 ,(propertize | 149 ,(propertize |
135 "%Z" | 150 "%Z" |
136 'help-echo | 151 'help-echo |
137 (purecopy (lambda (window object point) | 152 (purecopy (lambda (window object point) |
140 ;; Don't show this tip if the coding system is nil, | 155 ;; Don't show this tip if the coding system is nil, |
141 ;; it reads like a bug, and is not useful anyway. | 156 ;; it reads like a bug, and is not useful anyway. |
142 (when buffer-file-coding-system | 157 (when buffer-file-coding-system |
143 (if enable-multibyte-characters | 158 (if enable-multibyte-characters |
144 (concat (symbol-name buffer-file-coding-system) | 159 (concat (symbol-name buffer-file-coding-system) |
145 " buffer; see M-x describe-coding-system") | 160 " buffer; mouse-3: describe coding system") |
146 (concat "Unibyte " | 161 (concat "Unibyte " |
147 (symbol-name buffer-file-coding-system) | 162 (symbol-name buffer-file-coding-system) |
148 " buffer")))))))) | 163 " buffer")))))) |
164 'local-map mode-line-coding-system-map)) | |
149 "Mode-line control for displaying information of multilingual environment. | 165 "Mode-line control for displaying information of multilingual environment. |
150 Normally it displays current input method (if any activated) and | 166 Normally it displays current input method (if any activated) and |
151 mnemonics of the following coding systems: | 167 mnemonics of the following coding systems: |
152 coding system for saving or writing the current buffer | 168 coding system for saving or writing the current buffer |
153 coding system for keyboard input (if Emacs is running on terminal) | 169 coding system for keyboard input (if Emacs is running on terminal) |