diff options
| author | Juri Linkov | 2012-09-02 12:31:45 +0300 |
|---|---|---|
| committer | Juri Linkov | 2012-09-02 12:31:45 +0300 |
| commit | 63dd1c6fa45357d312e1d3076e15adacf5ed6291 (patch) | |
| tree | 8b2356ec3edd5498f0311417b50b14f5afb74b89 /etc | |
| parent | a08d4ba773a70961d153bf213db68dfcc5a50b01 (diff) | |
| download | emacs-63dd1c6fa45357d312e1d3076e15adacf5ed6291.tar.gz emacs-63dd1c6fa45357d312e1d3076e15adacf5ed6291.zip | |
Toggle whitespace matching mode with M-s SPC.
http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00008.html
* lisp/isearch.el (search-whitespace-regexp): Doc fix.
Remove cons cell customization.
(isearch-mode-map): Bind "\M-s " to isearch-toggle-lax-whitespace.
(isearch-lax-whitespace, isearch-regexp-lax-whitespace):
New variables.
(isearch-forward, isearch-forward-regexp): Doc fix.
(isearch-toggle-lax-whitespace): New command.
(search-forward-lax-whitespace, search-backward-lax-whitespace)
(re-search-forward-lax-whitespace)
(re-search-backward-lax-whitespace): New functions.
(isearch-whitespace-regexp): Remove function.
(isearch-query-replace): Let-bind replace-search-function and
replace-re-search-function.
(isearch-occur): Let-bind search-spaces-regexp according to the
value of isearch-lax-whitespace and isearch-regexp-lax-whitespace.
(isearch-quote-char): Check isearch-regexp-lax-whitespace in the
condition for C-q SPC.
(isearch-search-fun-default): Use new functions mentioned above.
(isearch-search-forward, isearch-search-backward): Remove functions.
(isearch-search): Don't let-bind search-spaces-regexp.
(isearch-lazy-highlight-space-regexp): Remove variable.
(isearch-lazy-highlight-lax-whitespace)
(isearch-lazy-highlight-regexp-lax-whitespace): New variables.
(isearch-lazy-highlight-new-loop): Use them.
(isearch-lazy-highlight-search): Don't let-bind search-spaces-regexp.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 14 |
1 files changed, 8 insertions, 6 deletions
| @@ -183,12 +183,14 @@ end of the buffer. It defaults to t. | |||
| 183 | and `M-s _' in Isearch toggles symbol search mode. | 183 | and `M-s _' in Isearch toggles symbol search mode. |
| 184 | `M-s c' in Isearch toggles search case-sensitivity. | 184 | `M-s c' in Isearch toggles search case-sensitivity. |
| 185 | 185 | ||
| 186 | *** `search-whitespace-regexp' now acts on ordinary incremental search | 186 | *** `M-s SPC' in Isearch toggles whitespace matching mode |
| 187 | as well, so that each sequence of spaces in the search string matches | 187 | in both ordinary and regexp incremental search, so that each |
| 188 | any combination of one or more whitespace characters. To change this | 188 | sequence of spaces in the search string matches any combination |
| 189 | behavior, you can give `search-whitespace-regexp' a cons cell value, | 189 | of one or more whitespace characters defined by the variable |
| 190 | where the car and cdr specify values for ordinary and regular | 190 | `search-whitespace-regexp'. In ordinary incremental search, |
| 191 | expression incremental search respectively. | 191 | `isearch-toggle-lax-whitespace' toggles the value of the variable |
| 192 | `isearch-lax-whitespace'. In regexp incremental search, it toggles | ||
| 193 | the value of the variable `isearch-regexp-lax-whitespace'. | ||
| 192 | 194 | ||
| 193 | ** M-x move-to-column, if called interactively with no prefix arg, now | 195 | ** M-x move-to-column, if called interactively with no prefix arg, now |
| 194 | prompts for a column number. | 196 | prompts for a column number. |