diff options
Diffstat (limited to 'lisp/progmodes/which-func.el')
| -rw-r--r-- | lisp/progmodes/which-func.el | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 1fa37532ab0..a96bd076e12 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el | |||
| @@ -113,17 +113,40 @@ Zero means compute the Imenu menu regardless of size." | |||
| 113 | map) | 113 | map) |
| 114 | "Keymap to display on mode line which-func.") | 114 | "Keymap to display on mode line which-func.") |
| 115 | 115 | ||
| 116 | (defface which-func-face | 116 | (defface which-func |
| 117 | '((t (:inherit font-lock-function-name-face))) | 117 | ;; Whether `font-lock-function-name-face' is an appropriate face to |
| 118 | "Face used to highlight mode line function names. | 118 | ;; inherit depends on the mode-line face; define several variants based |
| 119 | Defaults to `font-lock-function-name-face' if font-lock is loaded." | 119 | ;; on the default mode-line face. |
| 120 | '(;; The default mode-line face on a high-color display is a relatively | ||
| 121 | ;; light color ("grey75"), and only the light-background variant of | ||
| 122 | ;; `font-lock-function-name-face' is visible against it. | ||
| 123 | (((class color) (min-colors 88) (background light)) | ||
| 124 | :inherit font-lock-function-name-face) | ||
| 125 | ;; The default mode-line face on other display types is inverse-video; | ||
| 126 | ;; it seems that only in the dark-background case is | ||
| 127 | ;; `font-lock-function-name-face' visible against it. | ||
| 128 | (((class grayscale mono) (background dark)) | ||
| 129 | :inherit font-lock-function-name-face) | ||
| 130 | (((class color) (background light)) | ||
| 131 | :inherit font-lock-function-name-face) | ||
| 132 | ;; If none of the above cases, use an explicit color chosen to contrast | ||
| 133 | ;; well with the default mode-line face. | ||
| 134 | (((class color) (min-colors 88) (background dark)) | ||
| 135 | :foreground "Blue1") | ||
| 136 | (((background dark)) | ||
| 137 | :foreground "Blue1") | ||
| 138 | (t | ||
| 139 | :foreground "LightSkyBlue")) | ||
| 140 | "Face used to highlight mode line function names." | ||
| 120 | :group 'which-func) | 141 | :group 'which-func) |
| 142 | ;; backward-compatibility alias | ||
| 143 | (put 'which-func-face 'face-alias 'which-func) | ||
| 121 | 144 | ||
| 122 | (defcustom which-func-format | 145 | (defcustom which-func-format |
| 123 | `("[" | 146 | `("[" |
| 124 | (:propertize which-func-current | 147 | (:propertize which-func-current |
| 125 | local-map ,which-func-keymap | 148 | local-map ,which-func-keymap |
| 126 | face which-func-face | 149 | face which-func |
| 127 | ;;mouse-face highlight ; currently not evaluated :-( | 150 | ;;mouse-face highlight ; currently not evaluated :-( |
| 128 | help-echo "mouse-1: go to beginning, mouse-2: toggle rest visibility, mouse-3: go to end") | 151 | help-echo "mouse-1: go to beginning, mouse-2: toggle rest visibility, mouse-3: go to end") |
| 129 | "]") | 152 | "]") |