help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ELisp: special read syntax for regular expressions?


From: Ilya Zakharevich
Subject: Re: ELisp: special read syntax for regular expressions?
Date: Sat, 12 Apr 2008 23:34:14 +0000 (UTC)
User-agent: trn [how to get a version via %-escapes???] with a custom header

[A complimentary Cc of this posting was sent to
Peter Dyballa 
<Peter_Dyballa@Web.DE>], who wrote in article 
<mailman.10316.1208041979.18990.help-gnu-emacs@gnu.org>:

> >> Too much,

> > CPerl/Microdocs/Faces menu entry explaines which faces are used for
> > what (or see `cperl-tips-faces').  In your judgement, which constructs
> > should be "glued" together into one face?

> Separators (high-lighted? bold face?), parentheses used semantically =20
> (not as element to be matched or found), "modifiers" like s or m =20
> before and [egimosx] after the RegExp, referenced text (i.n., inside =20
> "(" and ")"), back-references, class specifications ("[:alpha:]") if =20
> not already referenced, other text.

I have no idea what you are talking about.  Currently different parts
of a REx are merged into 10 distinct groups.  Apparently, your "too
much" comment suggests that you want some of these groups merged
together.

Do not see anything like this in your reply.  Could you use complete
sentences, please?  (For convenience of other readers, I reproduce the
current doc-strings below.)

> It might be desirable to use in the from part darker shades of the =20
> colour than in the to part, i.e., <colour>3 in from and <colour>2 in =20
> to section.

Do not know what you are talking about.  Do you mean the REx part and
the substitution part?  The substitution part is just a string...

> Since GNU Emacs has a very good undo

Could not agree less...

> function it might be =20=
> 
> better to emphasise on the from part, to think better about this, to =20
> achieve on first try the desired change. (At least I have to try more =20=
> 
> than once from time to time.)

Have no clue what it is you discuss now...

> >>  =3D96 where is the RegExp
> >
> > Do not know what you mean here.
> 
> There are so many and different colours in use that I hardly can =20
> recognise any REs. I have the feeling that most lines of your =20
> examples are faulty, but I confess that I do not know all Perl =20
> RegExps by heart.

This is what the fontification is for.  There is one error; it is
highlighted...  The other stuff is highlighted in such a way that one
can always see where any escape starts and ends, so one has a better
chance to find it in the docs.

Hope this helps,
Ilya

=======================================================

In regular expressions (including character classes):
  `font-lock-string-face'       \"Normal\" stuff and non-0-length constructs
  `font-lock-constant-face':    Delimiters
  `font-lock-warning-face'      Special-cased m// and s//foo/,
                                Mismatched closing delimiters, parens
                                we couldn't match, misplaced quantifiers,
                                unrecognized escape sequences
  `cperl-nonoverridable-face'   Modifiers, as gism in m/REx/gism
  `font-lock-type-face'         escape sequences with arguments (\\x \\23 \\p 
\\N)
                                and others match-a-char escape sequences
  `font-lock-keyword-face'      Capturing parens, and |
  `font-lock-function-name-face' Special symbols: $ ^ . [ ] [^ ] (?{ }) (??{ })
                                \"Range -\" in character classes
  `font-lock-builtin-face'      \"Remaining\" 0-length constructs, multipliers
                                ?+*{}, not-capturing parens, leading
                                backslashes of escape sequences
  `font-lock-variable-name-face' Interpolated constructs, embedded code,
                                POSIX classes (inside charclasses)
  `font-lock-comment-face'      Embedded comments


reply via email to

[Prev in Thread] Current Thread [Next in Thread]