help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Adding a tooltip to text that matches a regexp?


From: Tassilo Horn
Subject: Re: Adding a tooltip to text that matches a regexp?
Date: Sat, 22 Nov 2014 14:47:56 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Raffaele Ricciardi <rfflrccrd@gmail.com> writes:

>>> This adds a "Foo or Bar" tooltip to any occurences of the words foo
>>> or bar in the current buffer.
>>>
>>>    (font-lock-add-keywords nil
>>>      '(("\\<\\(foo\\|bar\\)\\>" 1 '(face nil help-echo "Foo or Bar"))))
>>
>> And I think you will want to add help-echo to
>> `font-lock-extra-managed-props'.
>
> Thank you.
>
> Should I make `font-lock-extra-managed-props' buffer local?

I'd say yes.

Bye,
Tassilo



reply via email to

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