emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tooltip frame uses (class mono) when processing defface specs


From: Joe Wells
Subject: Re: tooltip frame uses (class mono) when processing defface specs
Date: Wed, 19 Sep 2007 12:23:08 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Joe Wells <address@hidden> writes:

> When processing defface specs, the tooltip frame uses alternatives
> that select the characteristic (class mono).  Alternatives that select
> (class color) or (class grayscale) are not used.

Here are some examples that illustrate this point.

The examples assume you are running Emacs on a color display, and that
you have loaded font-lock.el.

If you evaluate the following expression, you get some nicely colored
text in your tooltip:

  (x-show-tip (propertize "hello" 'face '(:foreground "red")))

In contrast, if you evaluate the following expression, you get black
text in your tooltip:

  (x-show-tip (propertize "hello" 'face 'font-lock-keyword-face))

You can see that font-lock-keyword-face normally has foreground color
"Purple" by evaluating this expression:

  (with-output-to-temp-buffer "xyzzy"
    (set-buffer standard-output)
    (insert (propertize "hello" 'face 'font-lock-keyword-face)))

This illustrates that the tooltip frame is using the mono version of
named faces, even though the tooltip frame is perfectly capable of
displaying colors.

-- 
Joe

> Can this please be changed, or at least made customizable?
>
> I am trying to get the folding mode of AUCTeX to display nicer
> tooltips.  It would be nice if it could effectively use the
> fontification of hidden text in tooltips.  Right now, standard faces
> don't show well in the tooltips, because their mono version is used.
> It would be a big help if the standard face definitions showed nicely
> on tooltip frames.
>
> (Yes, there are other issues that also would need to be handled, like
> the way the tooltip-show function replaces the face of the message
> string with the face tooltip.  But that is in Emacs Lisp, and hence
> easier to fix, perhaps by making tooltip-show not do that if the
> message has a particular property on it.)
>
> -- 
> Joe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]