[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Customizing faces with `defcustom'
From: |
Juri Linkov |
Subject: |
Re: Customizing faces with `defcustom' |
Date: |
Sat, 31 Dec 2005 02:48:45 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
> I appreciate your proposal but for one issue: `mode-line-buffer' would
> usually highlight that part of the modeline where "previous / next
> buffer" mouse clicks operate on. Doing this differently for Info
> buffers appears counterintuitive. On the other hand, it would be
> convenient to make the modeline part occupied by the Info node name
> sensitive for `Info-next' / `Info-prev' (or `Info-history-forward' /
> `Info-history-back').
Good idea. I tried the following code and it works well.
(defvar Info-mode-line-node-keymap
(let ((map (make-sparse-keymap)))
(define-key map [mode-line mouse-1] 'Info-prev)
(define-key map [mode-line mouse-3] 'Info-next)
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)
"")
") "
(if Info-current-node
(propertize Info-current-node
'face 'info-mode-line-node
'help-echo
"mouse-1: previous node, mouse-3: next node"
'mouse-face 'mode-line-highlight
'local-map Info-mode-line-node-keymap)
""))))))
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: Customizing faces with `defcustom', (continued)
- Re: Customizing faces with `defcustom', martin rudalics, 2005/12/28
- Re: Customizing faces with `defcustom', Juri Linkov, 2005/12/28
- Re: Customizing faces with `defcustom', Richard M. Stallman, 2005/12/28
- Re: Customizing faces with `defcustom', martin rudalics, 2005/12/29
- Re: Customizing faces with `defcustom', Richard M. Stallman, 2005/12/29
- Re: Customizing faces with `defcustom', Richard M. Stallman, 2005/12/28
- Re: Customizing faces with `defcustom', Juri Linkov, 2005/12/28
- Re: Customizing faces with `defcustom', Richard M. Stallman, 2005/12/29
- Re: Customizing faces with `defcustom', Juri Linkov, 2005/12/30
- Re: Customizing faces with `defcustom', martin rudalics, 2005/12/30
- Re: Customizing faces with `defcustom',
Juri Linkov <=
- Re: Customizing faces with `defcustom', Richard M. Stallman, 2005/12/31
- Re: Customizing faces with `defcustom', Richard M. Stallman, 2005/12/30
- Re: Customizing faces with `defcustom', Juri Linkov, 2005/12/30
- Re: Customizing faces with `defcustom', Richard M. Stallman, 2005/12/31
- Re: Customizing faces with `defcustom', Richard M. Stallman, 2005/12/31
- Re: Customizing faces with `defcustom', martin rudalics, 2005/12/29
- Re: Customizing faces with `defcustom', Richard M. Stallman, 2005/12/29
- Re: Customizing faces with `defcustom', Richard M. Stallman, 2005/12/28
- Re: Customizing faces with `defcustom', Juri Linkov, 2005/12/27
- Re: Customizing faces with `defcustom', Richard M. Stallman, 2005/12/28