From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Adding a tooltip to text that matches a regexp? Date: Sat, 22 Nov 2014 14:47:56 +0100 Message-ID: <877fynxs6r.fsf@thinkpad-t440p.tsdh.org> References: <87vbm957gh.fsf@thinkpad-t440p.tsdh.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416664119 22889 80.91.229.3 (22 Nov 2014 13:48:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2014 13:48:39 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Raffaele Ricciardi Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 22 14:48:33 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XsB38-0006jI-Q8 for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Nov 2014 14:48:30 +0100 Original-Received: from localhost ([::1]:45498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsB38-0008Cn-AE for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Nov 2014 08:48:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsB2r-0008BV-Ao for help-gnu-emacs@gnu.org; Sat, 22 Nov 2014 08:48:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XsB2j-0001pK-LN for help-gnu-emacs@gnu.org; Sat, 22 Nov 2014 08:48:13 -0500 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:55172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsB2j-0001p8-D5 for help-gnu-emacs@gnu.org; Sat, 22 Nov 2014 08:48:05 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5BE852054B for ; Sat, 22 Nov 2014 08:48:03 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Sat, 22 Nov 2014 08:48:03 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:cc:subject:references :date:in-reply-to:message-id:mime-version:content-type; s= smtpout; bh=XtaYrQodwCKR8O0V8m4lH3lr0n0=; b=SfB+aiMVAWt2tDKcGpPz t9GVi27VEADzSjgQPGF3KedGN26pL9UkdxpO2ohwfQVaehPJjaaXiyNhuN1iwGGY 2/gRmfGQQ314qn4swmFUV3osjybXJzYMc6keYBuDvp2VZ2HDz+Ep5QujT3O918Wt eqGg8i7Pv0WZRxWEM0287gE= X-Sasl-enc: NGeRuO93IcvZ3VyInPcDgmqgUj9PKiRvJLa2XQIIXhjr 1416664082 Original-Received: from thinkpad-t440p.tsdh.org (unknown [2.160.212.97]) by mail.messagingengine.com (Postfix) with ESMTPA id 5E5FEC00008; Sat, 22 Nov 2014 08:48:02 -0500 (EST) Mail-Followup-To: Raffaele Ricciardi , help-gnu-emacs@gnu.org In-Reply-To: (Raffaele Ricciardi's message of "Sat, 22 Nov 2014 13:48:06 +0100") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.111.4.28 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101115 Archived-At: Raffaele Ricciardi 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