aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorArtur Malabarba2016-02-06 18:44:22 +0000
committerArtur Malabarba2016-02-06 22:48:32 +0000
commit4ea1ea7c73f40a5bb3955273312f337dc332d6aa (patch)
tree5dbbff67476c6a5450024d1094b1349237ffe8b2 /lisp
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/isearch.el16
-rw-r--r--lisp/menu-bar.el2
2 files changed, 9 insertions, 9 deletions
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))