From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vaidheeswaran C Newsgroups: gmane.emacs.help Subject: Re: How to add syntax-highlighting to a Help buffer? Date: Fri, 03 Jul 2015 14:50:27 +0530 Message-ID: References: Reply-To: vaidheeswaran.chinnaraju@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1435915254 16781 80.91.229.3 (3 Jul 2015 09:20:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Jul 2015 09:20:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 03 11:20:45 2015 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 1ZAx9G-0000b4-ER for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jul 2015 11:20:42 +0200 Original-Received: from localhost ([::1]:39992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAx9F-0004JR-Ne for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jul 2015 05:20:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAx94-0004JM-NV for help-gnu-emacs@gnu.org; Fri, 03 Jul 2015 05:20:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAx8y-0005TX-Eu for help-gnu-emacs@gnu.org; Fri, 03 Jul 2015 05:20:30 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:41465) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAx8y-0005TM-7F for help-gnu-emacs@gnu.org; Fri, 03 Jul 2015 05:20:24 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZAx8v-0000Oi-JV for help-gnu-emacs@gnu.org; Fri, 03 Jul 2015 11:20:21 +0200 Original-Received: from 106.216.143.210 ([106.216.143.210]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Jul 2015 11:20:21 +0200 Original-Received: from vaidheeswaran.chinnaraju by 106.216.143.210 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 03 Jul 2015 11:20:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 106.216.143.210 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.3.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:105381 Archived-At: Put it in hi-lock-mode. See if it helps. C-h K C-x w h On Friday 03 July 2015 01:29 PM, Raffaele Ricciardi wrote: > I would like to add some syntax-highlighting to Help buffers. I have > tried to do that for example with the Help buffer displayed by C-h f > read-string RET, by following the usual way: > > (font-lock-add-keywords > nil > `(("\\(arbitrary regexp\\)" 1 'font-lock-function-name-face))) > > But the above expression breaks the existing highlighting (the > highlighting of the function arguments disappears). Also, now C-- C-x > C-q M-: (insert (propertize "test" 'face 'font-lock-warning-face)) RET > does not insert colorized text as it would do with a fresh Help buffer. > > I am using GNU Emacs 24.5. > > Thank you. >