[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: search-whitespace-regexp
From: |
Chong Yidong |
Subject: |
Re: search-whitespace-regexp |
Date: |
Sun, 6 Feb 2005 20:36:39 -0500 (EST) |
User-agent: |
SquirrelMail/1.4.3a |
Let me try to explain my idea more clearly.
Since RMS has raised the issue of incompatibility, I think the default
behavior for isearch should be left as it was in 21.3, for the moment. In
other words, regexp search has a magic space, and string search doesn't.
However, there should be a way for the user to customize this.
It is relatively easy for a user to get rid of the magic space for regexp
search, if he wants to:
(setq search-whitespace-regexp nil)
However, there is no easy way for a user to turn on the magic space for
string search; you have to hack isearch.el to do it. I suggest
implementing an analogous mechanism for string search (I'm not certain
what the variable should be called, though):
(defvar search-string-whitespace-regexp nil
"If non-nil, regular expression to match a sequence of whitespace chars.
This applies to ordinary incremental search.
You might want to use something like "[ \t\r\n]+" instead.")
Because the default is nil, there is no magic space, and the behavior is
like 21.3 and below; but users or Lisp libraries can set it as needed. For
example, longlines.el can set it to "[ \n]" so that linebreaks and spaces
are treated equally.
- Re: search-whitespace-regexp, (continued)
- Re: search-whitespace-regexp, Richard Stallman, 2005/02/05
- Re: search-whitespace-regexp, Chong Yidong, 2005/02/05
- Re: search-whitespace-regexp, Richard Stallman, 2005/02/06
- Re: search-whitespace-regexp, Stefan Monnier, 2005/02/06
- Re: search-whitespace-regexp, Miles Bader, 2005/02/06
- Re: search-whitespace-regexp, Stefan Monnier, 2005/02/06
- Re: search-whitespace-regexp, Miles Bader, 2005/02/06
- RE: search-whitespace-regexp, Drew Adams, 2005/02/06
- Re: search-whitespace-regexp, Miles Bader, 2005/02/06
- Re: search-whitespace-regexp,
Chong Yidong <=
- RE: search-whitespace-regexp, Drew Adams, 2005/02/06
- Re: search-whitespace-regexp, Andreas Schwab, 2005/02/07
- Re: search-whitespace-regexp, Richard Stallman, 2005/02/07
- Re: search-whitespace-regexp, Richard Stallman, 2005/02/07
- Re: search-whitespace-regexp, Stefan Monnier, 2005/02/07
- Re: search-whitespace-regexp, Miles Bader, 2005/02/07