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: define-minor-mode: what's the purpose of the BODY argument? Date: Thu, 16 Aug 2012 22:32:50 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1345152918 18130 80.91.229.3 (16 Aug 2012 21:35:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Aug 2012 21:35:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 16 23:35:18 2012 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 1T27ik-0006jB-3P for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Aug 2012 23:35:14 +0200 Original-Received: from localhost ([::1]:51321 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T27ii-0002nP-Rp for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Aug 2012 17:35:12 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-X-Trace: individual.net sE4JruazaizIHrS4M+q/jAc+acZvHEOnwTy71rJ9WS1S9MWdNKxlCoW5Np68xQOExn Cancel-Lock: sha1:oZU8k6r39UayIgkMGeDBzbo1BDE= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: Original-Xref: usenet.stanford.edu gnu.emacs.help:194012 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:86380 On 08/16/2012 06:23 PM, Raffaele Ricciardi wrote: > Well, I discovered that the argument is indeed documented, only not as > prominently as the others. Therefore I missed it, also because > arguments in > Info mode are not highlighted the way I'm used to in Help mode. I > apologize for > the inconvenience. And to avoid cutting a sorry figure like this one in the future, I've written a snippet of code to highlight arguments in Info mode, too, and I'm attaching it. Arguments are empirically identified as symbols of two or more uppercase letters, digits or dashes, starting with a letter. I would have preferred using the `help-argument-name' face, but on my installation this face misbehaves (I've filed a bug report), so I'm using `font-lock-comment-face'. (defun rr-Info-mode-highlight-argument-names () "Highlight argument names as they are highlighted in Help mode." ;; To avoid highlighting uppercase single letters in the text, highlight ;; only symbols more than one character long. (font-lock-add-keywords nil '(("\\_<[A-Z][-A-Z[:digit:]]+\\_>" . font-lock-comment-face)))) (add-hook 'Info-mode-hook #'rr-Info-mode-highlight-argument-names)