From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: regexp font-lock highlighting Date: Sun, 03 Jul 2005 03:09:08 +0300 Organization: JURTA Message-ID: <87slyw8zm3.fsf@jurta.org> References: <429AD1B5.1020408@gmx.at> <42A16247.7010204@gmx.at> <42A4186E.1080902@gmx.at> <42B05087.10108@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1120356383 12946 80.91.229.2 (3 Jul 2005 02:06:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 3 Jul 2005 02:06:23 +0000 (UTC) Cc: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 03 04:06:18 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dots0-0007o9-B0 for ged-emacs-devel@m.gmane.org; Sun, 03 Jul 2005 04:06:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dott8-0001hJ-Dy for ged-emacs-devel@m.gmane.org; Sat, 02 Jul 2005 22:07:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dotn4-0000fB-Ua for emacs-devel@gnu.org; Sat, 02 Jul 2005 22:01:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dotmn-0000WX-Fw for emacs-devel@gnu.org; Sat, 02 Jul 2005 22:00:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dotmn-0000SF-7l for emacs-devel@gnu.org; Sat, 02 Jul 2005 22:00:45 -0400 Original-Received: from [194.126.101.116] (helo=HOT-Bounce1.hot.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DotfB-00050i-2k for emacs-devel@gnu.org; Sat, 02 Jul 2005 21:52:53 -0400 Original-Received: from mail.neti.ee (Relay5 [192.168.1.24]) by HOT-Bounce1.hot.ee (Postfix) with ESMTP id 3DC6B14E742 for ; Sun, 3 Jul 2005 04:33:44 +0300 (EEST) Original-Received: from mail.neti.ee (80-235-35-135-dsl.mus.estpak.ee [80.235.35.135]) by Relayhost2.neti.ee (Postfix) with ESMTP id 418C81E2A; Sun, 3 Jul 2005 04:46:41 +0300 (EEST) Original-To: emacs-devel@gnu.org In-Reply-To: <42B05087.10108@gmx.at> (martin rudalics's message of "Wed, 15 Jun 2005 18:00:07 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:40171 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40171 What were the reasons for making long face names much longer? After renaming `font-lock-regexp-backslash-construct' it became absurdly long: `font-lock-regexp-backslash-grouping-construct'. The face name is not the place for full description of the face. There are docstrings for that purpose. But even the new docstring is less informative than the face name: "Font Lock mode face used to highlight grouping constructs in Lisp regexps." Unlike the face name it doesn't mention the word `backslash'. Long face names cause several problems for users. For example, after `M-x customize-face RET' on this face, its name doesn't fit into the minibuffer: Customize face (default font-lock-regexp-backslash-grouping-construct): font-lock-regexp-backslash-grouping-construct In the *Faces* buffer long face names move example alphabets off the screen: font-lock-doc-face abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ font-lock-function-name-face abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ font-lock-keyword-face abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ font-lock-negation-char-face abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ font-lock-preprocessor-face abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ font-lock-regexp-grouping-backslash abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ font-lock-regexp-backslash-grouping-construct abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ font-lock-string-face abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ font-lock-type-face abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ font-lock-variable-name-face abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ font-lock-warning-face abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ fringe abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ header-line abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ and other inconveniences. I think the face names proposed by Martin in his latest patch are much better: `font-lock-regexp-backslash' and `font-lock-regexp-group'. These face name have sensible lengths and are still descriptive enough. BTW, I noticed that backslashes and grouping characters are more readable when they both are highlighted in bold, i.e. I also propose the following change: Index: lisp/font-lock.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/font-lock.el,v retrieving revision 1.265 diff -u -r1.265 font-lock.el --- lisp/font-lock.el 29 Jun 2005 08:19:17 -0000 1.265 +++ lisp/font-lock.el 3 Jul 2005 00:17:25 -0000 @@ -1826,14 +1827,13 @@ :group 'font-lock-highlighting-faces) -(defface font-lock-regexp-grouping-backslash - '((((class color) (min-colors 16)) :inherit escape-glyph) - (t :inherit bold)) +(defface font-lock-regexp-backslash + '((t :inherit bold)) "Font Lock mode face for backslashes in Lisp regexp grouping constructs." :group 'font-lock-highlighting-faces) -(defface font-lock-regexp-backslash-grouping-construct +(defface font-lock-regexp-group '((t :inherit bold)) - "Font Lock mode face used to highlight grouping constructs in Lisp regexps." + "Font Lock mode face for grouping constructs in Lisp regexps." :group 'font-lock-highlighting-faces) -- Juri Linkov http://www.jurta.org/emacs/