aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2005-06-15 04:35:23 +0000
committerMiles Bader2005-06-15 04:35:23 +0000
commitef88a9999004e6c26148c8d280d6a41f623d7249 (patch)
tree519272f0075058a970e266d959dac2eb5e3dd360
parent950850233d48dddfb6ef972ed22764f3d0662571 (diff)
downloademacs-ef88a9999004e6c26148c8d280d6a41f623d7249.tar.gz
emacs-ef88a9999004e6c26148c8d280d6a41f623d7249.zip
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-421
Tweak which-func face 2005-06-15 Miles Bader <miles@gnu.org> * lisp/progmodes/which-func.el (which-func): Only inherit `font-lock-function-name-face' when that makes sense against the default mode-line face, otherwise set the face color explicitly.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/progmodes/which-func.el27
2 files changed, 28 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 83e92a71907..13d14707284 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12005-06-15 Miles Bader <miles@gnu.org> 12005-06-15 Miles Bader <miles@gnu.org>
2 2
3 * progmodes/which-func.el (which-func): Only inherit
4 `font-lock-function-name-face' when that makes sense against the
5 default mode-line face, otherwise set the face color explicitly.
6
3 * progmodes/cperl-mode.el (cperl-init-faces): Use literal cperl 7 * progmodes/cperl-mode.el (cperl-init-faces): Use literal cperl
4 faces instead of (non-existent) variables. 8 faces instead of (non-existent) variables.
5 9
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index 960eec2208c..a96bd076e12 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -114,9 +114,30 @@ Zero means compute the Imenu menu regardless of size."
114 "Keymap to display on mode line which-func.") 114 "Keymap to display on mode line which-func.")
115 115
116(defface which-func 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
119Defaults 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)
121;; backward-compatibility alias 142;; backward-compatibility alias
122(put 'which-func-face 'face-alias 'which-func) 143(put 'which-func-face 'face-alias 'which-func)