[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regexp font-lock highlighting
From: |
Juri Linkov |
Subject: |
Re: regexp font-lock highlighting |
Date: |
Sun, 03 Jul 2005 03:09:08 +0300 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
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/
- Re: regexp font-lock highlighting,
Juri Linkov <=