all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: 8962@debbugs.gnu.org
Subject: bug#8962: 24.0.50; do not simply reuse (hard-code) font-lock faces for apropos
Date: Wed, 29 Jun 2011 14:02:47 -0700	[thread overview]
Message-ID: <0BA368FEA6EB4C78A0F4D086431F7658@us.oracle.com> (raw)

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'







             reply	other threads:[~2011-06-29 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29 21:02 Drew Adams [this message]
2012-04-23 15:40 ` bug#8962: 24.0.50; do not simply reuse (hard-code) font-lock faces for apropos 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0BA368FEA6EB4C78A0F4D086431F7658@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=8962@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.