From: Andreas Schwab <schwab@suse.de>
Cc: Luc Teirlinck <teirllm@dms.auburn.edu>, emacs-devel@gnu.org
Subject: Re: Unquoted special characters in regexps
Date: Sun, 26 Feb 2006 14:50:38 +0100 [thread overview]
Message-ID: <jefym6ut3l.fsf@sykes.suse.de> (raw)
In-Reply-To: <4401A98D.3070809@gmx.at> (martin rudalics's message of "Sun, 26 Feb 2006 14:13:49 +0100")
martin rudalics <rudalics@gmx.at> writes:
> That of closing a character alternative. When you write
>
> (defvar foo "]")
> (defvar bar "\\]")
>
> you can't interchangeably use `foo' and `bar' in an arbitrary regular
> expression. Some people call this "referential transparency".
Of course you can't, since the meaning of '\' is context dependent.
> Anyway, the first `]' has a special meaning but it's not "inside" the
> character alternative.
It is part of it, just like the leading '['.
> It does have a special meaning because `]' is special _outside_
> character alternatives.
This is wrong. Outside of a character set ']' has no special meaning
whatsoever, independent of the context.
> According to the Elisp manual all these exhibit "poor practice" since
> you didn't quote the second `]'s.
It's a bug in the manual.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2006-02-26 13:50 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-25 17:23 Unquoted special characters in regexps martin rudalics
2006-02-25 18:42 ` Andreas Schwab
2006-02-25 19:18 ` martin rudalics
2006-02-25 19:31 ` Andreas Schwab
2006-02-25 20:18 ` martin rudalics
2006-02-25 22:09 ` Andreas Schwab
2006-02-26 11:32 ` martin rudalics
2006-02-26 11:50 ` Andreas Schwab
2006-02-26 13:28 ` martin rudalics
2006-02-25 22:13 ` Luc Teirlinck
2006-02-26 13:13 ` martin rudalics
2006-02-26 13:50 ` Andreas Schwab [this message]
2006-02-26 16:41 ` Luc Teirlinck
2006-02-26 17:53 ` martin rudalics
2006-02-26 18:22 ` Luc Teirlinck
2006-02-26 19:26 ` martin rudalics
2006-02-26 17:10 ` martin rudalics
2006-02-26 17:42 ` Luc Teirlinck
2006-02-26 19:06 ` martin rudalics
2006-02-26 17:56 ` Andreas Schwab
2006-02-26 19:08 ` martin rudalics
2006-02-27 19:03 ` Richard Stallman
2006-02-27 19:36 ` Andreas Schwab
2006-02-27 20:03 ` martin rudalics
2006-02-27 20:32 ` Andreas Schwab
2006-02-27 21:43 ` martin rudalics
2006-02-27 22:11 ` Andreas Schwab
2006-02-28 6:19 ` Richard Stallman
2006-02-28 10:28 ` martin rudalics
2006-02-28 0:30 ` Luc Teirlinck
2006-02-28 10:27 ` martin rudalics
2006-02-28 22:57 ` Luc Teirlinck
2006-03-01 13:00 ` martin rudalics
2006-03-01 17:54 ` Richard Stallman
2006-03-02 4:06 ` Luc Teirlinck
2006-03-02 19:43 ` Richard Stallman
2006-03-02 4:54 ` Luc Teirlinck
2006-03-02 18:40 ` martin rudalics
2006-03-02 23:26 ` Luc Teirlinck
2006-03-03 7:42 ` martin rudalics
2006-03-03 13:51 ` Luc Teirlinck
2006-03-03 14:09 ` Luc Teirlinck
2006-03-03 18:52 ` martin rudalics
2006-03-03 22:41 ` Luc Teirlinck
2006-03-03 23:00 ` Luc Teirlinck
2006-03-03 10:25 ` Richard Stallman
2006-03-03 15:20 ` martin rudalics
2006-03-04 13:37 ` Richard Stallman
2006-03-04 14:40 ` martin rudalics
2006-03-06 0:48 ` Richard Stallman
2006-03-03 10:25 ` Richard Stallman
2006-03-03 15:51 ` martin rudalics
2006-03-03 23:48 ` Luc Teirlinck
2006-03-04 9:58 ` martin rudalics
2006-03-04 23:16 ` Luc Teirlinck
2006-03-05 2:54 ` Luc Teirlinck
2006-03-06 0:49 ` Richard Stallman
2006-02-28 0:44 ` Luc Teirlinck
2006-03-04 21:07 ` Thien-Thi Nguyen
2006-03-05 3:37 ` Luc Teirlinck
2006-03-05 11:10 ` martin rudalics
2006-03-05 15:32 ` Luc Teirlinck
2006-03-06 7:41 ` martin rudalics
2006-03-05 17:04 ` Luc Teirlinck
2006-03-05 11:54 ` martin rudalics
2006-03-05 15:35 ` Andreas Schwab
2006-03-06 8:19 ` martin rudalics
2006-03-05 18:36 ` Luc Teirlinck
2006-03-05 19:14 ` Luc Teirlinck
2006-03-06 8:17 ` martin rudalics
2006-02-28 0:59 ` Luc Teirlinck
2006-03-06 12:52 ` Richard Stallman
2006-03-07 5:52 ` Luc Teirlinck
2006-03-07 8:53 ` martin rudalics
2006-02-25 22:34 ` Luc Teirlinck
2006-02-25 22:59 ` Andreas Schwab
2006-02-26 13:20 ` martin rudalics
2006-02-26 16:53 ` Luc Teirlinck
2006-02-26 18:01 ` martin rudalics
2006-02-26 17:19 ` Luc Teirlinck
2006-02-26 18:13 ` martin rudalics
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jefym6ut3l.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=emacs-devel@gnu.org \
--cc=teirllm@dms.auburn.edu \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.