aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Malabarba2016-02-06 18:44:22 +0000
committerArtur Malabarba2016-02-06 22:48:32 +0000
commit4ea1ea7c73f40a5bb3955273312f337dc332d6aa (patch)
tree5dbbff67476c6a5450024d1094b1349237ffe8b2
parentc77ffc8019bceb850a794c13f2e3ad991cc7e412 (diff)
downloademacs-4ea1ea7c73f40a5bb3955273312f337dc332d6aa.tar.gz
emacs-4ea1ea7c73f40a5bb3955273312f337dc332d6aa.zip
* lisp/isearch.el: Rename search-default-regexp-mode to search-default-mode
(search-default-mode): New variable. (isearch-mode, isearch-define-mode-toggle) (isearch--describe-regexp-mode): Update accordingly. * lisp/menu-bar.el (nonincremental-search-forward): Update accordingly. * etc/NEWS: Update accordingly. * doc/emacs/search.texi: Update accordingly.
-rw-r--r--doc/emacs/search.texi4
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/isearch.el16
-rw-r--r--lisp/menu-bar.el2
4 files changed, 12 insertions, 12 deletions
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index e854646d056..10c1f73b331 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -1268,7 +1268,7 @@ character sequences}.
1268 Generally, search commands in Emacs by default perform character 1268 Generally, search commands in Emacs by default perform character
1269folding, thus matching equivalent character sequences. You can 1269folding, thus matching equivalent character sequences. You can
1270disable this behavior by customizing the variable 1270disable this behavior by customizing the variable
1271@code{search-default-regexp-mode} to @code{nil}. @xref{Search 1271@code{search-default-mode} to @code{nil}. @xref{Search
1272Customizations}. Within an incremental search, typing @kbd{M-s '} 1272Customizations}. Within an incremental search, typing @kbd{M-s '}
1273(@code{isearch-toggle-character-fold}) toggles character folding, but 1273(@code{isearch-toggle-character-fold}) toggles character folding, but
1274only for that search. (Replace commands have a different default, 1274only for that search. (Replace commands have a different default,
@@ -1800,7 +1800,7 @@ not described elsewhere.
1800@cindex default search mode 1800@cindex default search mode
1801@cindex search mode, default 1801@cindex search mode, default
1802 The default search mode for the incremental search is specified by 1802 The default search mode for the incremental search is specified by
1803the variable @code{search-default-regexp-mode}. It can be @code{nil}, 1803the variable @code{search-default-mode}. It can be @code{nil},
1804@code{t}, or a function. If it is @code{nil}, the default mode is to 1804@code{t}, or a function. If it is @code{nil}, the default mode is to
1805do literal searches without character folding, but with case folding 1805do literal searches without character folding, but with case folding
1806and lax-whitespace matches as determined by @code{case-fold-search} 1806and lax-whitespace matches as determined by @code{case-fold-search}
diff --git a/etc/NEWS b/etc/NEWS
index c98ef264bdd..e5f34a1d8a0 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -586,7 +586,7 @@ item as before.
586** Search and Replace 586** Search and Replace
587 587
588+++ 588+++
589*** New user option `search-default-regexp-mode' 589*** New user option `search-default-mode'
590specifies the default mode for I-search. 590specifies the default mode for I-search.
591 591
592+++ 592+++
diff --git a/lisp/isearch.el b/lisp/isearch.el
index c36f4631549..1718096957e 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -224,7 +224,7 @@ Default value, nil, means edit the string instead."
224 224
225(autoload 'character-fold-to-regexp "character-fold") 225(autoload 'character-fold-to-regexp "character-fold")
226 226
227(defcustom search-default-regexp-mode #'character-fold-to-regexp 227(defcustom search-default-mode #'character-fold-to-regexp
228 "Default mode to use when starting isearch. 228 "Default mode to use when starting isearch.
229Value is nil, t, or a function. 229Value is nil, t, or a function.
230 230
@@ -868,11 +868,11 @@ used to set the value of `isearch-regexp-function'."
868 (setq isearch-forward forward 868 (setq isearch-forward forward
869 isearch-regexp (or regexp 869 isearch-regexp (or regexp
870 (and (not regexp-function) 870 (and (not regexp-function)
871 (eq search-default-regexp-mode t))) 871 (eq search-default-mode t)))
872 isearch-regexp-function (or regexp-function 872 isearch-regexp-function (or regexp-function
873 (and (functionp search-default-regexp-mode) 873 (and (functionp search-default-mode)
874 (not regexp) 874 (not regexp)
875 search-default-regexp-mode)) 875 search-default-mode))
876 isearch-op-fun op-fun 876 isearch-op-fun op-fun
877 isearch-last-case-fold-search isearch-case-fold-search 877 isearch-last-case-fold-search isearch-case-fold-search
878 isearch-case-fold-search case-fold-search 878 isearch-case-fold-search case-fold-search
@@ -1506,7 +1506,7 @@ Use `isearch-exit' to quit without signaling."
1506 (isearch-repeat 'backward)) 1506 (isearch-repeat 'backward))
1507 1507
1508 1508
1509;;; Toggles for `isearch-regexp-function' and `search-default-regexp-mode'. 1509;;; Toggles for `isearch-regexp-function' and `search-default-mode'.
1510(defmacro isearch-define-mode-toggle (mode key function &optional docstring &rest body) 1510(defmacro isearch-define-mode-toggle (mode key function &optional docstring &rest body)
1511 "Define a command called `isearch-toggle-MODE' and bind it to `M-s KEY'. 1511 "Define a command called `isearch-toggle-MODE' and bind it to `M-s KEY'.
1512The first line of the command's docstring is auto-generated, the 1512The first line of the command's docstring is auto-generated, the
@@ -1538,7 +1538,7 @@ The command then executes BODY and updates the isearch prompt."
1538 (cl-callf (lambda (types) (cons 'choice 1538 (cl-callf (lambda (types) (cons 'choice
1539 (cons '(const :tag ,(capitalize (format "%s search" mode)) ,function) 1539 (cons '(const :tag ,(capitalize (format "%s search" mode)) ,function)
1540 (cdr types)))) 1540 (cdr types))))
1541 (get 'search-default-regexp-mode 'custom-type))))))) 1541 (get 'search-default-mode 'custom-type)))))))
1542 1542
1543(isearch-define-mode-toggle word "w" word-search-regexp "\ 1543(isearch-define-mode-toggle word "w" word-search-regexp "\
1544Turning on word search turns off regexp mode.") 1544Turning on word search turns off regexp mode.")
@@ -2571,7 +2571,7 @@ the word mode."
2571 (setq regexp-function #'word-search-regexp)) 2571 (setq regexp-function #'word-search-regexp))
2572 (let ((description 2572 (let ((description
2573 ;; Don't use a description on the default search mode. 2573 ;; Don't use a description on the default search mode.
2574 (cond ((equal regexp-function search-default-regexp-mode) "") 2574 (cond ((equal regexp-function search-default-mode) "")
2575 (regexp-function 2575 (regexp-function
2576 (and (symbolp regexp-function) 2576 (and (symbolp regexp-function)
2577 (or (get regexp-function 'isearch-message-prefix) 2577 (or (get regexp-function 'isearch-message-prefix)
@@ -2579,7 +2579,7 @@ the word mode."
2579 (isearch-regexp "regexp ") 2579 (isearch-regexp "regexp ")
2580 ;; We're in literal mode. If the default mode is not 2580 ;; We're in literal mode. If the default mode is not
2581 ;; literal, then describe it. 2581 ;; literal, then describe it.
2582 ((functionp search-default-regexp-mode) "literal ")))) 2582 ((functionp search-default-mode) "literal "))))
2583 (if space-before 2583 (if space-before
2584 ;; Move space from the end to the beginning. 2584 ;; Move space from the end to the beginning.
2585 (replace-regexp-in-string "\\(.*\\) \\'" " \\1" description) 2585 (replace-regexp-in-string "\\(.*\\) \\'" " \\1" description)
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index f9dde5748c2..254bdeecaae 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -244,7 +244,7 @@
244 (setq menu-bar-last-search-type 'string) 244 (setq menu-bar-last-search-type 'string)
245 ;; Ideally, this whole command would be equivalent to `C-s RET'. 245 ;; Ideally, this whole command would be equivalent to `C-s RET'.
246 (let ((isearch-forward (not backward)) 246 (let ((isearch-forward (not backward))
247 (isearch-regexp-function search-default-regexp-mode) 247 (isearch-regexp-function search-default-mode)
248 (isearch-regexp nil)) 248 (isearch-regexp nil))
249 (if (or (equal string "") (not string)) 249 (if (or (equal string "") (not string))
250 (funcall (isearch-search-fun-default) (car search-ring)) 250 (funcall (isearch-search-fun-default) (car search-ring))