99 |
:group 'which-func |
:group 'which-func |
100 |
:type 'integer) |
:type 'integer) |
101 |
|
|
102 |
(defcustom which-func-format '("[" which-func-current "]") |
(defvar which-func-keymap |
103 |
|
(let ((map (make-sparse-keymap))) |
104 |
|
(define-key map [mode-line mouse-1] 'beginning-of-defun) |
105 |
|
(define-key map [mode-line mouse-2] |
106 |
|
(lambda () |
107 |
|
(interactive) |
108 |
|
(if (eq (point-min) 1) |
109 |
|
(narrow-to-defun) |
110 |
|
(widen)))) |
111 |
|
(define-key map [mode-line mouse-3] 'end-of-defun) |
112 |
|
map) |
113 |
|
"Keymap to display on mode line which-func.") |
114 |
|
|
115 |
|
(defface which-func-face |
116 |
|
'((t (:inherit font-lock-function-name-face))) |
117 |
|
"Face used to highlight mode line function names. |
118 |
|
Defaults to `font-lock-function-name-face' if font-lock is loaded." |
119 |
|
:group 'which-func) |
120 |
|
|
121 |
|
(defcustom which-func-format |
122 |
|
`("[" |
123 |
|
(:propertize which-func-current |
124 |
|
local-map ,which-func-keymap |
125 |
|
face which-func-face |
126 |
|
;;mouse-face highlight ; currently not evaluated :-( |
127 |
|
help-echo "mouse-1: go to beginning, mouse-2: toggle rest visibility, mouse-3: go to end") |
128 |
|
"]") |
129 |
"Format for displaying the function in the mode line." |
"Format for displaying the function in the mode line." |
130 |
:group 'which-func |
:group 'which-func |
131 |
:type 'sexp) |
:type 'sexp) |