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: Re: How to add syntax-highlighting to a Help buffer? Date: Sat, 4 Jul 2015 19:29:53 +0200 Message-ID: References: <87si94x1vk.fsf@web.de> <878uaw3qpc.fsf@nl106-137-147.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1436031036 28374 80.91.229.3 (4 Jul 2015 17:30:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jul 2015 17:30:36 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 04 19:30:19 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 1ZBRGc-0006er-P7 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Jul 2015 19:30:18 +0200 Original-Received: from localhost ([::1]:44931 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBRGc-0004R5-0b for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Jul 2015 13:30:18 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-X-Trace: individual.net usC7uLea0dZ7/J3553NcIAVzvskTnM3sVwFSpEgWGKHj2PiUtM Cancel-Lock: sha1:pSLs81UPlBssy3yKu5ZZxfwHcP0= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 In-Reply-To: Original-Xref: usenet.stanford.edu gnu.emacs.help:213144 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:105431 Archived-At: On 04/07/15 17:25, Michael Heerdegen wrote: > `font-lock-mode' is not so useful for the fontification of Help buffers, > so it makes sense not to use it. For highlighting regexps, as in your > examples, hi-lock is just fine. *Help* is mostly text, not code. I thought that Help buffers relied on Font Lock Mode because -- in a Help buffer -- `C-h v font-lock-mode RET' replied: Its value is t Local in buffer *Help*; global value is nil Non-nil if Font-Lock mode is enabled. Had the value of `font-lock-mode' been `nil', I would have thought otherwise. > OTOH the code could be easily rewritten to use font-lock-mode and > propertize via the font-lock-face text property. Now that I have understood how things work, I doubt that it would be beneficial to use Font Lock Mode in Help buffers, because the text could be mixed (for example: Emacs Lisp code and regular text). Therefore, it makes sense to highlight each portion of text in an specific way, as Emacs does now.