emacs-devel
[Top][All Lists]
Advanced

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

Re: /srv/bzr/emacs/trunk r101829: (regexp-opt): Add `symbols' mode.


From: Miles Bader
Subject: Re: /srv/bzr/emacs/trunk r101829: (regexp-opt): Add `symbols' mode.
Date: Fri, 08 Oct 2010 09:21:19 +0900

Glenn Morris <address@hidden> 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.



reply via email to

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