pitkali / pos-tip

Show tooltip at point
37 stars 14 forks source link

Wrong tooltip font at first invocation of pos-tip-show #1

Closed pitkali closed 11 years ago

pitkali commented 11 years ago

When using auto-complete with pos-tip, the first ever tooltip shown after starting Emacs, and only that one, uses incorrect text colour parameters, as if the face attributes where not set correctly.

This might have been caused by using `make-face' to create a temporary face. The make-face documentation mentions that it should not be used from Lisp source code, and instead defface should be used. This does seem to be the root of the problem.

However, keeping a separate face that is kept being reset over and over again just to propertize the tooltip text seems like an overkill. Documentation on text properties indicates that instead of an actual face object, one can use a list of face attributes.

Indeed using a list of relevant attributes instead of a temporary face fixes the observed problem, and enables to remove with-selected-window and changing the face attributes for all frames.

pitkali commented 11 years ago

Fixed in 036e09a