unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: martin rudalics <rudalics@gmx.at>
Subject: Re: regexp font-lock highlighting
Date: Sun, 03 Jul 2005 03:09:08 +0300	[thread overview]
Message-ID: <87slyw8zm3.fsf@jurta.org> (raw)
In-Reply-To: <42B05087.10108@gmx.at> (martin rudalics's message of "Wed, 15 Jun 2005 18:00:07 +0200")

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/

  reply	other threads:[~2005-07-03  0:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-30  8:41 regexp font-lock highlighting martin rudalics
2005-05-31  2:45 ` Daniel Brockman
2005-06-01  9:39 ` Richard Stallman
2005-06-04  8:11   ` martin rudalics
2005-06-04 17:59     ` Richard Stallman
2005-06-06  9:33       ` martin rudalics
2005-06-11 23:17         ` Richard Stallman
2005-06-15 16:00           ` martin rudalics
2005-07-03  0:09             ` Juri Linkov [this message]
2005-07-03  4:10               ` Luc Teirlinck
2005-07-03  6:03               ` Eli Zaretskii
2005-07-03  9:10                 ` martin rudalics
2005-07-04  0:09                   ` Miles Bader
2005-06-06 13:05 ` Juri Linkov
2005-06-08 15:13   ` martin rudalics
2005-06-08 20:34     ` Juri Linkov
2005-06-08 22:42       ` Stefan Monnier
2005-06-08 23:32         ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87slyw8zm3.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).