* Re: /srv/bzr/emacs/trunk r101829: (regexp-opt): Add `symbols' mode.
[not found] <E1P3lfN-0006A0-6b@internal.in.savannah.gnu.org>
@ 2010-10-07 17:03 ` Glenn Morris
2010-10-08 0:21 ` Miles Bader
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2010-10-07 17:03 UTC (permalink / raw)
To: Miles Bader; +Cc: emacs-devel
Miles Bader wrote:
> revno: 101829
> committer: Miles Bader <miles@gnu.org>
> branch nick: trunk
> timestamp: Thu 2010-10-07 16:24:21 +0900
> message:
> (regexp-opt): Add `symbols' mode.
Please see
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4392#12
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /srv/bzr/emacs/trunk r101829: (regexp-opt): Add `symbols' mode.
2010-10-07 17:03 ` /srv/bzr/emacs/trunk r101829: (regexp-opt): Add `symbols' mode Glenn Morris
@ 2010-10-08 0:21 ` Miles Bader
2010-10-09 0:00 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Miles Bader @ 2010-10-08 0:21 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel
Glenn Morris <rgm@gnu.org> writes:
>> (regexp-opt): Add `symbols' mode.
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4392#12
Oh brother. I thought "oh there's no point in discussing this first
because it's _so obvious and trivial_..."
I made that chance in response to seeing some (not in emacs) elisp
code that -- incorrectly, since it's a programming language mode --
switched from concatenating \\< and \\> to using `words'. The
result of course was exactly identical, but apparently the mode
author felt that using `words' was more blessed or something.
Thus I think regexp-opt should have support/advertise both
`words' and `symbols' or it should do neither, because having
only `words' lends a subtle advocacy.
Alternatively, the support could be left in, but the docstring and
documentation changed to say something like:
"... If you want to match only whole words or symbols, then
surround the return value with \\< and \\> or \\_< and \\_>
(the latter being more appropriate for matching programming
language keywords and the like), using `concat'. Previously
this function advertised a magic value of `words' for the PAREN
argument, but it is now deprecated, and should not be used."
-Miles
--
Genealogy, n. An account of one's descent from an ancestor who did not
particularly care to trace his own.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /srv/bzr/emacs/trunk r101829: (regexp-opt): Add `symbols' mode.
2010-10-08 0:21 ` Miles Bader
@ 2010-10-09 0:00 ` Stefan Monnier
2010-10-09 1:01 ` Miles Bader
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2010-10-09 0:00 UTC (permalink / raw)
To: Miles Bader; +Cc: emacs-devel
>>> (regexp-opt): Add `symbols' mode.
>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4392#12
> Oh brother. I thought "oh there's no point in discussing this first
> because it's _so obvious and trivial_..."
I didn't bother reacting, indeed.
> Thus I think regexp-opt should have support/advertise both
> `words' and `symbols' or it should do neither, because having
> only `words' lends a subtle advocacy.
How'bout we set-advertised-calling-convention so as to obsolete the
second argument?
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /srv/bzr/emacs/trunk r101829: (regexp-opt): Add `symbols' mode.
2010-10-09 0:00 ` Stefan Monnier
@ 2010-10-09 1:01 ` Miles Bader
2010-10-09 1:28 ` Miles Bader
0 siblings, 1 reply; 5+ messages in thread
From: Miles Bader @ 2010-10-09 1:01 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> How'bout we set-advertised-calling-convention so as to obsolete the
> second argument?
But that's only reasonable if regexp-opt adds "significant" parens by
default, and doing so actually does run a risk of screwing up existing
users (because their match-data indices can be effected).
-Miles
--
Cynic, n. A blackguard whose faulty vision sees things as they are, not as
they ought to be. Hence the custom among the Scythians of plucking out a
cynic's eyes to improve his vision.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /srv/bzr/emacs/trunk r101829: (regexp-opt): Add `symbols' mode.
2010-10-09 1:01 ` Miles Bader
@ 2010-10-09 1:28 ` Miles Bader
0 siblings, 0 replies; 5+ messages in thread
From: Miles Bader @ 2010-10-09 1:28 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Miles Bader <miles@gnu.org> writes:
>> How'bout we set-advertised-calling-convention so as to obsolete the
>> second argument?
>
> But that's only reasonable if regexp-opt adds "significant" parens by
> default, and doing so actually does run a risk of screwing up existing
> users (because their match-data indices can be effected).
Hmm, or are you thinking that callers should just always add \\( and \\)
themselves?
-miles
--
Congratulation, n. The civility of envy.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-09 1:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1P3lfN-0006A0-6b@internal.in.savannah.gnu.org>
2010-10-07 17:03 ` /srv/bzr/emacs/trunk r101829: (regexp-opt): Add `symbols' mode Glenn Morris
2010-10-08 0:21 ` Miles Bader
2010-10-09 0:00 ` Stefan Monnier
2010-10-09 1:01 ` Miles Bader
2010-10-09 1:28 ` Miles Bader
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).