diff options
| author | Artur Malabarba | 2015-01-27 14:08:01 -0200 |
|---|---|---|
| committer | Artur Malabarba | 2015-06-23 20:09:06 +0100 |
| commit | c7a19e0c80ec6134ab6fb1950d3e1ac59a7b986f (patch) | |
| tree | 0efcd7a931162664e9992a34277709e31b003c0b /lisp/replace.el | |
| parent | 2ca5558395c92b25b58478627b426c66f8e4f170 (diff) | |
| download | emacs-c7a19e0c80ec6134ab6fb1950d3e1ac59a7b986f.tar.gz emacs-c7a19e0c80ec6134ab6fb1950d3e1ac59a7b986f.zip | |
* lisp/isearch.el: Fold many unicode characters to ASCII
(isearch-character-fold-search, isearch--character-fold-extras)
(isearch--character-fold-table): New variable.
(isearch--character-folded-regexp): New function.
(isearch-search-fun-default): Use them.
* lisp/replace.el (replace-character-fold): New variable.
(replace-search): Use it.
* etc/NEWS: Document it.
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 74909efa380..5e3ddc551fb 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -33,6 +33,14 @@ | |||
| 33 | :type 'boolean | 33 | :type 'boolean |
| 34 | :group 'matching) | 34 | :group 'matching) |
| 35 | 35 | ||
| 36 | (defcustom replace-character-fold t | ||
| 37 | "Non-nil means `query-replace' should do character folding in matches. | ||
| 38 | This means, for instance, that ' will match a large variety of | ||
| 39 | unicode quotes." | ||
| 40 | :type 'boolean | ||
| 41 | :group 'matching | ||
| 42 | :version "25.1") | ||
| 43 | |||
| 36 | (defcustom replace-lax-whitespace nil | 44 | (defcustom replace-lax-whitespace nil |
| 37 | "Non-nil means `query-replace' matches a sequence of whitespace chars. | 45 | "Non-nil means `query-replace' matches a sequence of whitespace chars. |
| 38 | When you enter a space or spaces in the strings to be replaced, | 46 | When you enter a space or spaces in the strings to be replaced, |
| @@ -2005,6 +2013,7 @@ It is called with three arguments, as if it were | |||
| 2005 | ;; used after `recursive-edit' might override them. | 2013 | ;; used after `recursive-edit' might override them. |
| 2006 | (let* ((isearch-regexp regexp-flag) | 2014 | (let* ((isearch-regexp regexp-flag) |
| 2007 | (isearch-word delimited-flag) | 2015 | (isearch-word delimited-flag) |
| 2016 | (isearch-character-fold-search replace-character-fold) | ||
| 2008 | (isearch-lax-whitespace | 2017 | (isearch-lax-whitespace |
| 2009 | replace-lax-whitespace) | 2018 | replace-lax-whitespace) |
| 2010 | (isearch-regexp-lax-whitespace | 2019 | (isearch-regexp-lax-whitespace |