From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ilya Zakharevich Newsgroups: gmane.emacs.help Subject: Re: ELisp: special read syntax for regular expressions? Date: Sat, 12 Apr 2008 23:34:14 +0000 (UTC) Organization: U.C. Berkeley Math. Department. Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1208043643 27368 80.91.229.12 (12 Apr 2008 23:40:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Apr 2008 23:40:43 +0000 (UTC) Bcc: ilya To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 13 01:41:17 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JkpLQ-0004mn-Nt for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Apr 2008 01:41:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JkpKm-0004oM-Km for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Apr 2008 19:40:36 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!agate.berkeley.edu!ilya Original-Newsgroups: gnu.emacs.help Original-Lines: 83 Original-NNTP-Posting-Host: powdermilk.math.berkeley.edu Original-X-Trace: agate.berkeley.edu 1208043254 14675 169.229.140.13 (12 Apr 2008 23:34:14 GMT) Original-X-Complaints-To: usenet@agate.berkeley.edu Original-NNTP-Posting-Date: Sat, 12 Apr 2008 23:34:14 +0000 (UTC) User-Agent: trn [how to get a version via %-escapes???] with a custom header X-How-To-Reach-Me: The From: address is valid X-How-To-Disable-Cc: Put in the headers the line: Mail-Copies-To: never Originator: ilya@powdermilk.math.berkeley.edu Original-Xref: shelby.stanford.edu gnu.emacs.help:157894 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:53261 Archived-At: [A complimentary Cc of this posting was sent to Peter Dyballa ], who wrote in article : > >> 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., 3 in from and 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