From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Raffaele Ricciardi Newsgroups: gmane.emacs.help Subject: How to add syntax-highlighting to a Help buffer? Date: Fri, 3 Jul 2015 09:59:23 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1435910430 7681 80.91.229.3 (3 Jul 2015 08:00:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Jul 2015 08:00:30 +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 10:00:23 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 1ZAvtU-0008CK-KR for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jul 2015 10:00:20 +0200 Original-Received: from localhost ([::1]:39729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAvtT-0003g3-P0 for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jul 2015 04:00:19 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 16 Original-X-Trace: individual.net O3ip0XL7JmXBUyBbhQl6RAyKYlXHvHzTEnQJGG0aYxnnjzyTwP Cancel-Lock: sha1:RtF5SPJME47lXH7mZ4+T/nu4aYU= X-Mozilla-News-Host: snews://News.Individual.NET:563 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 Original-Xref: usenet.stanford.edu gnu.emacs.help:213090 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:105377 Archived-At: 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.