aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/grep.el2
-rw-r--r--lisp/progmodes/which-func.el28
2 files changed, 28 insertions, 2 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index a871380d06f..5b678f26171 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -414,7 +414,7 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
414(defun grep (command-args &optional highlight-regexp) 414(defun grep (command-args &optional highlight-regexp)
415 "Run grep, with user-specified args, and collect output in a buffer. 415 "Run grep, with user-specified args, and collect output in a buffer.
416While grep runs asynchronously, you can use \\[next-error] (M-x next-error), 416While grep runs asynchronously, you can use \\[next-error] (M-x next-error),
417or \\<grep-minor-mode-map>\\[compile-goto-error] in the grep \ 417or \\<grep-mode-map>\\[compile-goto-error] in the grep \
418output buffer, to go to the lines 418output buffer, to go to the lines
419where grep found matches. 419where grep found matches.
420 420
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index fef159d850f..87df0769314 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -99,7 +99,33 @@ Zero means compute the Imenu menu regardless of size."
99 :group 'which-func 99 :group 'which-func
100 :type 'integer) 100 :type 'integer)
101 101
102(defcustom which-func-format '("[" which-func-current "]") 102(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.
118Defaults 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 "]")
103 "Format for displaying the function in the mode line." 129 "Format for displaying the function in the mode line."
104 :group 'which-func 130 :group 'which-func
105 :type 'sexp) 131 :type 'sexp)