~pitkali/+junk/pos-tip.el

Viewing all changes in revision 119.

  • Committer: Piotr Kalinowski
  • Date: 2013-07-17 16:33:39 UTC
  • Revision ID: pitkali@gmail.com-20130717163339-qfw2m64cbf1gryyl
Fix problem when using pos-tip-show for the first time

When displaying first tooltip after starting Emacs, text attributes
would not be correctly applied, resulting in incorrect colour of tooltip
text and background. This would be visible only for the text, frame
foreground and background were set correctly.

This seems to have been related to the use of `make-face' to create a
temporary face for applying those text attributes. According to
documentation this function should not be used from Lisp source code. In
fact it turns out that there's no need to use a separate face at all: it
is sufficient to use a list of desired face attributes that should be
applied to text.

This fixes the problem and removes potentially costly operations
involving changing selected windows and manipulating face properties for
all the frames.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: