diff options
author | Juri Linkov <juri@jurta.org> | 2006-01-16 23:54:02 +0000 |
---|---|---|
committer | Juri Linkov <juri@jurta.org> | 2006-01-16 23:54:02 +0000 |
commit | 8eafa1659b4a28d2b4176fa8462815d525d24724 (patch) | |
tree | 6995dce9f86e20aab97bda18afbb0ce9046e5ed7 /lisp/info.el | |
parent | 4ec983f1032ea87c064920743adb9f9e5211a1cf (diff) | |
download | emacs-8eafa1659b4a28d2b4176fa8462815d525d24724.tar.gz |
(Info-mode-line-node-keymap): New defvar.
(Info-set-mode-line): Use `stringp' to check Info-current-file.
Propertize Info-current-node with `mode-line-buffer-id' and
`mode-line-highlight' faces and `Info-mode-line-node-keymap'.
Diffstat (limited to 'lisp/info.el')
-rw-r--r-- | lisp/info.el | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/lisp/info.el b/lisp/info.el index 386f549d3e2..8bd266cffc0 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1399,15 +1399,31 @@ any double quotes or backslashes must be escaped (\\\",\\\\)." (Info-hide-cookies-node) (run-hooks 'Info-selection-hook))))) +(defvar Info-mode-line-node-keymap + (let ((map (make-sparse-keymap))) + (define-key map [mode-line mouse-1] 'Info-scroll-up) + (define-key map [mode-line mouse-3] 'Info-scroll-down) + map) + "Keymap to put on the Info node name in the mode line.") + (defun Info-set-mode-line () (setq mode-line-buffer-identification (nconc (propertized-buffer-identification "%b") (list - (concat " (" - (if Info-current-file - (file-name-nondirectory Info-current-file) - " ") - ") " (or Info-current-node "")))))) + (concat + " (" + (if (stringp Info-current-file) + (file-name-nondirectory Info-current-file) + "") + ") " + (if Info-current-node + (propertize Info-current-node + 'face 'mode-line-buffer-id + 'help-echo + "mouse-1: scroll forward, mouse-3: scroll back" + 'mouse-face 'mode-line-highlight + 'local-map Info-mode-line-node-keymap) + "")))))) ;; Go to an Info node specified with a filename-and-nodename string ;; of the sort that is found in pointers in nodes. |