diff options
| author | Gerd Moellmann | 2001-08-30 14:19:34 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-08-30 14:19:34 +0000 |
| commit | f31859242526b34ef3e575fedb7728a6e9f81644 (patch) | |
| tree | 245f619846d9f97e121ff631950f56130f469493 | |
| parent | 200f868eb31d872ee793f9e7e01cd7a710f42cfd (diff) | |
| download | emacs-f31859242526b34ef3e575fedb7728a6e9f81644.tar.gz emacs-f31859242526b34ef3e575fedb7728a6e9f81644.zip | |
(mode-line-coding-system-map): New variable.
(mode-line-mule-info): Give the "%Z" a local-map keymap.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/bindings.el | 22 |
2 files changed, 22 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 863f7269a47..87b73dcaf74 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2001-08-30 Gerd Moellmann <gerd@gnu.org> | 1 | 2001-08-30 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * bindings.el (mode-line-coding-system-map): New variable. | ||
| 4 | (mode-line-mule-info): Give the "%Z" a local-map keymap. | ||
| 5 | |||
| 3 | * simple.el (eval-expression-print-level): Change the type | 6 | * simple.el (eval-expression-print-level): Change the type |
| 4 | of the defcustom to allow nil. | 7 | of the defcustom to allow nil. |
| 5 | 8 | ||
diff --git a/lisp/bindings.el b/lisp/bindings.el index aff7fcea74d..30e93659814 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -120,6 +120,21 @@ corresponding to the mode line clicked." | |||
| 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 |
| @@ -129,7 +144,7 @@ corresponding to the mode line clicked." | |||
| 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" |
| @@ -142,10 +157,11 @@ corresponding to the mode line clicked." | |||
| 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: |