unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Whitespace search and regex.c
@ 2004-11-22 17:24 Stefan Monnier
  2004-11-25  2:21 ` Richard Stallman
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2004-11-22 17:24 UTC (permalink / raw)



What is this recent change to regex.c w.r.t whitespace search all about?
This is really ugly.

As best as I can tell, this is to avoid the problem where
(replace-regexp-in-string " " "\\(?:\s-+\\)" ...) does not give the right
result because the " " could be inside brackets.

I think that changing regex.c for this one special case is a mistake.
Not only because it dirties up the regex.[ch] abstraction even further by
adding yet a bit more Emacs specific code in regex.[ch].

After all this problem manifests itself at a few other places (such as
regexp-opt-depth) as well.  So I think a more general solution would be much
more useful and cleaner.  E.g. a function (parse-partial-regex REGEXP POS)
which would return a value indicating whether POS is within brackets or not.


        Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-12-05 15:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-22 17:24 Whitespace search and regex.c Stefan Monnier
2004-11-25  2:21 ` Richard Stallman
2004-11-25 15:20   ` Stefan Monnier
2004-11-26 21:03     ` Richard Stallman
2004-11-26 22:12       ` Stefan Monnier
2004-11-29  6:12         ` Richard Stallman
2004-12-05 15:33           ` Juri Linkov

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).