From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: info faces for strings and quotations Date: Sun, 3 Oct 2004 00:05:48 -0700 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1096787191 27256 80.91.229.6 (3 Oct 2004 07:06:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 3 Oct 2004 07:06:31 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 03 09:06:19 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CE0Rn-0006Zn-00 for ; Sun, 03 Oct 2004 09:06:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CE0YK-0000s3-8M for ged-emacs-devel@m.gmane.org; Sun, 03 Oct 2004 03:13:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CE0YE-0000ro-13 for emacs-devel@gnu.org; Sun, 03 Oct 2004 03:12:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CE0YD-0000rc-Ie for emacs-devel@gnu.org; Sun, 03 Oct 2004 03:12:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CE0YD-0000rZ-EP for emacs-devel@gnu.org; Sun, 03 Oct 2004 03:12:57 -0400 Original-Received: from [141.146.126.230] (helo=agminet03.oracle.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CE0RQ-0001pk-J5 for emacs-devel@gnu.org; Sun, 03 Oct 2004 03:05:56 -0400 Original-Received: from rgmgw3.us.oracle.com (rgmgw3.us.oracle.com [138.1.191.12]) by agminet03.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id i9375sh6029275 for ; Sun, 3 Oct 2004 00:05:54 -0700 Original-Received: from rgmgw3.us.oracle.com (localhost [127.0.0.1]) by rgmgw3.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id i9375s17029066 for ; Sun, 3 Oct 2004 01:05:54 -0600 Original-Received: from dradamslap (dhcp-amer-csvpn-gw2-141-144-81-110.vpn.oracle.com [141.144.81.110]) by rgmgw3.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id i9375sAY029061 for ; Sun, 3 Oct 2004 01:05:54 -0600 Original-To: "Emacs-Devel" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27819 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27819 I find Info to be a lot more readable with strings ("blah blah toto titi") and quoted names (`my-foobar-function') highlighted in different faces from the rest of the text. What about adding something simple like this to the end of Info-fontify-node - just before (set-buffer-modified-p nil): (goto-char (point-min)) (while (re-search-forward "`\\([^']+\\)'" nil t) (put-text-property (match-beginning 1) (match-end 1) 'face info-quoted-name-face)) (goto-char (point-min)) (while (re-search-forward "\"\\([^\"]+\\)\"" nil t) (put-text-property (match-beginning 1) (match-end 1) 'face info-string-face)) Granted, there are a few Info nodes that get thrown off by this simple matching because of unbalanced double or single quotes. This happens when a node discusses characters like \", \`, and \' or uses this, where the two are nested: `""'. Probably most of these problems could be eliminated by smartening up the regexps. Most of the "rogue" occurrences of these characters are preceded by backslashes: \". Even with these simple regexps, however, 99% of the pages look better, and the text is much more readable, IMO. In particular, it is very helpful that quoted names stand out; the double-quoted strings are less important. To see this at its _worst_, these are the nodes of the Emacs manual that throw off the regexps to some extent: - Glossary - Key (Character) Index - Minor Modes - Init Syntax - Printing and MS-DOS - Cursor Position Information (at the bottom) - TeX Editing Commands - Options Controlling Comments - Etags Regexps - Acknowledgements