[Top][All Lists]

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

Re: Interpretation of a space in regexp isearch?

From: Juri Linkov
Subject: Re: Interpretation of a space in regexp isearch?
Date: Thu, 30 Aug 2012 12:18:11 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu)

> This trick to preserve backward compatibility doesn't work for
> isearch.el's defcustoms, because they are loaded by default.  So if the
> user customizes `search-whitespace-regexp', a new
> `regexp-search-whitespace-regexp' in isearch.el would end up with the
> default value of s-w-r, not the customized value.

Actually I see no need to have two separate values of whitespace regexps.

What is needed more is a new option to enable/disable this feature
without changing the value of `search-whitespace-regexp'.

Then its default value could depend on the major mode.  For instance,
the users might want to enable whitespace mode in Text mode, Help mode and
Info mode, but not in other modes.  This will be easy to do in hooks
setting a buffer-local value of the new variable `search-whitespace'
(or `whitespace-search').

So it will have the same flexibility as its counterpart option
`case-fold-search' (but its isearch implementation will be different
because currently whitespace mode is applicable only to regexp search).

reply via email to

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