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

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

Re: regex-opt does not accept 'symbol as second arg?


From: Tim X
Subject: Re: regex-opt does not accept 'symbol as second arg?
Date: Mon, 13 Oct 2008 18:48:27 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Nikolaj Schumacher <me@nschum.de> writes:

> Tim X <timx@nospam.dev.null> wrote:
>
>> In emacs 23, it appears to be working as it is supposed to. It does take
>> an arbitrary symbol, but the symbol "'words" has special meaning over just a
>> non-nil value e.g.
>
> The idea was that 'symbol or 'symbols should also have a special meaning.
>
>> ELISP> (regexp-opt '("This" "That" "Those") 'symbol)
>> "\\(Th\\(?:at\\|is\\|ose\\)\\)"
>
> should return "\\_<\\(Th\\(?:at\\|is\\|ose\\)\\)\\_>" instead.
>

OK, I see what your getting at now. In that case, it certanly could be
requested as an enhancement, but I wouldn't say that it is a bug because
it was never a feature of the utility i.e. it was developed for strings
rather than symbols. However, at what point do we draw the line. For
example, should the symbol 'buffer be added to put a \b at each end etc.

Personally, I can't see where I'd have a use for this feature. this
doesn't mean there isn't a use case, I have just never come across
one. On the other hand, I've used regexp-opt for matching against
strings a lot. 

Tim

tim

-- 
tcross (at) rapttech dot com dot au


reply via email to

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