summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-03-16 06:51:23 +0000
committerRichard M. Stallman <rms@gnu.org>2002-03-16 06:51:23 +0000
commit7e98f74cdf49a6f5a554e4910f51c00ebef5a48f (patch)
treef386cc531cb7cf4037ac1976c93346352911af36
parent2c3d8820e2dfc29d39e2f29e2d3567ddcd82d623 (diff)
downloademacs-7e98f74cdf49a6f5a554e4910f51c00ebef5a48f.tar.gz
(mode-line-mule-info): In computing help-echo prop,
avoid using save-window-excursion. And compile the function.
-rw-r--r--lisp/bindings.el22
1 files changed, 10 insertions, 12 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 4135cf1c187..2d22d2b2f9d 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -149,18 +149,16 @@ corresponding to the mode line clicked."
,(propertize
"%Z"
'help-echo
- (purecopy (lambda (window object point)
- (save-window-excursion
- (select-window window)
- ;; Don't show this tip if the coding system is nil,
- ;; it reads like a bug, and is not useful anyway.
- (when buffer-file-coding-system
- (if enable-multibyte-characters
- (concat (symbol-name buffer-file-coding-system)
- " buffer; mouse-3: describe coding system")
- (concat "Unibyte "
- (symbol-name buffer-file-coding-system)
- " buffer"))))))
+ #'(lambda (window object point)
+ (with-current-buffer (window-buffer window)
+ ;; Don't show this tip if the coding system is nil,
+ ;; it reads like a bug, and is not useful anyway.
+ (when buffer-file-coding-system
+ (if enable-multibyte-characters
+ (concat (symbol-name buffer-file-coding-system)
+ " buffer; mouse-3: describe coding system")
+ (concat "Unibyte " (symbol-name buffer-file-coding-system)
+ " 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