all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#8962: 24.0.50; do not simply reuse (hard-code) font-lock faces for apropos
@ 2011-06-29 21:02 Drew Adams
  2012-04-23 15:40 ` Chong Yidong
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2011-06-29 21:02 UTC (permalink / raw)
  To: 8962

In the past, the same, hard-coded face (`(italic variable-pitch)') was
used for the `Command', `Variable', `Option', and `Properties' links in
apropos output buffers.

At least this had the advantage of not being horribly ugly.  But it had
the disadvantage of not distinguishing the various types of thing by
appearance.

The problem with the current situation is that you have simply reused
font-lock faces, instead of creating new faces (that perhaps inherit
from the same font-lock faces).

Faces that a user might have customized for font-lock, and which work
well for code (e.g. Lisp code), do not necessarily work well for
apropos.

For instance, I use red for `font-lock-function-name-face'.  That is
horrible in apropos output.  But I have no way to customize it for
apropos, without also changing it for code etc.

This is very unwise design.  If you want to use a customizable face
instead of hard-coding the face, great.  But in that case create faces
for apropos itself, so a user can customize the appearance of apropos
without also affecting the appearance of font-lock in general.

You can always make the apropos faces inherit from any faces you like.
But please do not couple things this way, making it hard on users.

This kind of thing is hard-coding - a no-no:

(define-button-type 'apropos-function
  'apropos-label "Function"
  'apropos-short-label "f"
  'face '(font-lock-function-name-face button)
;;      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;;      NO NO ----------

  'help-echo "mouse-2, RET: Display more help on this function"
  'follow-link t
  'action (lambda (button)
     (describe-function (button-get button 'apropos-symbol))))


In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-06-27 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/build/include'







^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <871uqj3y99.fsf@gnu.org>]

end of thread, other threads:[~2012-04-23 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29 21:02 bug#8962: 24.0.50; do not simply reuse (hard-code) font-lock faces for apropos Drew Adams
2012-04-23 15:40 ` Chong Yidong
     [not found] <871uqj3y99.fsf@gnu.org>
     [not found] ` <handler.s.C.132781283014536.transcript@debbugs.gnu.org>
2012-01-29  5:19   ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.