diff options
| author | Dave Love | 2000-07-18 21:53:46 +0000 |
|---|---|---|
| committer | Dave Love | 2000-07-18 21:53:46 +0000 |
| commit | 3beb81fce9c339dede2069acb632ef31f76639fc (patch) | |
| tree | a8fe16f23cd7f384e41dcb46298b6812929f96fd | |
| parent | dc1cac5985c88bc22d4e241989a3dc566bf8d7f2 (diff) | |
| download | emacs-3beb81fce9c339dede2069acb632ef31f76639fc.tar.gz emacs-3beb81fce9c339dede2069acb632ef31f76639fc.zip | |
(mode-line-mule-info, mode-line-modified): help-echo
improvements.
| -rw-r--r-- | lisp/bindings.el | 54 |
1 files changed, 42 insertions, 12 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el index 45858cbd136..c6aefec186c 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -85,15 +85,25 @@ corresponding to the mode line clicked." | |||
| 85 | `("" | 85 | `("" |
| 86 | (current-input-method | 86 | (current-input-method |
| 87 | (:eval | 87 | (:eval |
| 88 | (propertize current-input-method-title | 88 | ,(purecopy |
| 89 | 'help-echo (concat ,(purecopy "Input method: ") | 89 | '(propertize current-input-method-title |
| 90 | current-input-method | 90 | 'help-echo (concat |
| 91 | ,(purecopy ". mouse-2 disables, \ | 91 | "Input method: " |
| 92 | mouse-3 describes")) | 92 | current-input-method |
| 93 | 'local-map mode-line-input-method-map))) | 93 | ". mouse-2 disables, mouse-3 describes") |
| 94 | ,(propertize "%Z" | 94 | 'local-map mode-line-input-method-map)))) |
| 95 | 'help-echo (purecopy "Coding system information: \ | 95 | ,(propertize |
| 96 | see M-x describe-coding-system"))) | 96 | "%Z" |
| 97 | 'help-echo | ||
| 98 | (purecopy (lambda (window object point) | ||
| 99 | (save-window-excursion | ||
| 100 | (select-window window) | ||
| 101 | (if enable-multibyte-characters | ||
| 102 | (concat (symbol-name buffer-file-coding-system) | ||
| 103 | " buffer; see M-x describe-coding-system") | ||
| 104 | (concat "Unibyte " | ||
| 105 | (symbol-name buffer-file-coding-system) | ||
| 106 | " buffer"))))))) | ||
| 97 | "Mode-line control for displaying information of multilingual environment. | 107 | "Mode-line control for displaying information of multilingual environment. |
| 98 | Normally it displays current input method (if any activated) and | 108 | Normally it displays current input method (if any activated) and |
| 99 | mnemonics of the following coding systems: | 109 | mnemonics of the following coding systems: |
| @@ -125,9 +135,29 @@ Normally nil in most modes, since there is no process to display.") | |||
| 125 | 135 | ||
| 126 | (defvar mode-line-modified | 136 | (defvar mode-line-modified |
| 127 | (list (propertize | 137 | (list (propertize |
| 128 | "%1*%1+" | 138 | "%1*" |
| 129 | 'help-echo (purecopy "Read-only status: mouse-2 toggles it") | 139 | 'help-echo (purecopy (lambda (window object point) |
| 130 | 'local-map (purecopy (make-mode-line-mouse2-map #'toggle-read-only)))) | 140 | (format "%sead-only: mouse-2 toggles" |
| 141 | (save-selected-window | ||
| 142 | (select-window window) | ||
| 143 | (if buffer-read-only | ||
| 144 | "R" | ||
| 145 | "Not r"))))) | ||
| 146 | 'local-map (purecopy (make-mode-line-mouse2-map #'toggle-read-only))) | ||
| 147 | (propertize | ||
| 148 | "%1+" | ||
| 149 | 'help-echo (purecopy (lambda (window object point) | ||
| 150 | (format "%sodified: mouse-2 toggles flag" | ||
| 151 | (save-selected-window | ||
| 152 | (select-window window) | ||
| 153 | (if (buffer-modified-p) | ||
| 154 | "M" | ||
| 155 | "Not m"))))) | ||
| 156 | 'local-map (purecopy (make-mode-line-mouse2-map | ||
| 157 | (lambda () | ||
| 158 | (interactive) | ||
| 159 | (set-buffer-modified-p | ||
| 160 | (not (buffer-modified-p)))))))) | ||
| 131 | "Mode-line control for displaying whether current buffer is modified.") | 161 | "Mode-line control for displaying whether current buffer is modified.") |
| 132 | 162 | ||
| 133 | (make-variable-buffer-local 'mode-line-modified) | 163 | (make-variable-buffer-local 'mode-line-modified) |