aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2008-07-31 17:19:28 +0000
committerJuri Linkov2008-07-31 17:19:28 +0000
commit8938c0bc9c82fd25186d5e23da83dee696738c22 (patch)
tree17480bc6255d1071b57568e8dc9da6c6a7ffa10f
parent03d3db39f630bbdf393ce8219da35a0efa3bb16b (diff)
downloademacs-8938c0bc9c82fd25186d5e23da83dee696738c22.tar.gz
emacs-8938c0bc9c82fd25186d5e23da83dee696738c22.zip
(isearch-forward-regexp, isearch-forward-word)
(isearch-backward, isearch-backward-regexp): Doc fix - make a link to the command `isearch-forward' instead of displaying "See C-s". (isearch-highlight-regexp): Remove arguments `regexp' and `face' with their interactive specifictions. Move reading the face name to the main body after calls to isearch-done and isearch-clean-overlays.
-rw-r--r--lisp/isearch.el41
1 files changed, 21 insertions, 20 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 944ea9b7ed6..42c213a63dd 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -684,8 +684,8 @@ the calling function until the search is done."
684 "\ 684 "\
685Do incremental search forward for regular expression. 685Do incremental search forward for regular expression.
686With a prefix argument, do a regular string search instead. 686With a prefix argument, do a regular string search instead.
687Like ordinary incremental search except that your input 687Like ordinary incremental search except that your input is treated
688is treated as a regexp. See \\[isearch-forward] for more info. 688as a regexp. See the command `isearch-forward' for more information.
689 689
690In regexp incremental searches, a space or spaces normally matches 690In regexp incremental searches, a space or spaces normally matches
691any whitespace (the variable `search-whitespace-regexp' controls 691any whitespace (the variable `search-whitespace-regexp' controls
@@ -698,9 +698,9 @@ and nothing else, enter C-q SPC."
698 "\ 698 "\
699Do incremental search forward for a sequence of words. 699Do incremental search forward for a sequence of words.
700With a prefix argument, do a regular string search instead. 700With a prefix argument, do a regular string search instead.
701Like ordinary incremental search except that your input 701Like ordinary incremental search except that your input is treated
702is treated as a sequence of words without regard to how the 702as a sequence of words without regard to how the words are separated.
703words are separated. See \\[isearch-forward] for more info." 703See the command `isearch-forward' for more information."
704 (interactive "P\np") 704 (interactive "P\np")
705 (isearch-mode t nil nil (not no-recursive-edit) (null not-word))) 705 (isearch-mode t nil nil (not no-recursive-edit) (null not-word)))
706 706
@@ -708,7 +708,7 @@ words are separated. See \\[isearch-forward] for more info."
708 "\ 708 "\
709Do incremental search backward. 709Do incremental search backward.
710With a prefix argument, do a regular expression search instead. 710With a prefix argument, do a regular expression search instead.
711See \\[isearch-forward] for more information." 711See the command `isearch-forward' for more information."
712 (interactive "P\np") 712 (interactive "P\np")
713 (isearch-mode nil (not (null regexp-p)) nil (not no-recursive-edit))) 713 (isearch-mode nil (not (null regexp-p)) nil (not no-recursive-edit)))
714 714
@@ -716,8 +716,8 @@ See \\[isearch-forward] for more information."
716 "\ 716 "\
717Do incremental search backward for regular expression. 717Do incremental search backward for regular expression.
718With a prefix argument, do a regular string search instead. 718With a prefix argument, do a regular string search instead.
719Like ordinary incremental search except that your input 719Like ordinary incremental search except that your input is treated
720is treated as a regexp. See \\[isearch-forward] for more info." 720as a regexp. See the command `isearch-forward' for more information."
721 (interactive "P\np") 721 (interactive "P\np")
722 (isearch-mode nil (null not-regexp) nil (not no-recursive-edit))) 722 (isearch-mode nil (null not-regexp) nil (not no-recursive-edit)))
723 723
@@ -1384,22 +1384,23 @@ string. NLINES has the same meaning as in `occur'."
1384(declare-function hi-lock-regexp-okay "hi-lock" (regexp)) 1384(declare-function hi-lock-regexp-okay "hi-lock" (regexp))
1385(declare-function hi-lock-read-face-name "hi-lock" ()) 1385(declare-function hi-lock-read-face-name "hi-lock" ())
1386 1386
1387(defun isearch-highlight-regexp (regexp &optional face) 1387(defun isearch-highlight-regexp ()
1388 "Run `highlight-regexp' with regexp from the current search string. 1388 "Run `highlight-regexp' with regexp from the current search string.
1389Interactively, REGEXP is the current search regexp or a quoted search 1389It exits Isearch mode and calls `hi-lock-face-buffer' with its regexp
1390string. FACE has the same meaning as in `highlight-regexp'." 1390argument from the last search regexp or a quoted search string,
1391 (interactive 1391and reads its face argument using `hi-lock-read-face-name'."
1392 (list 1392 (interactive)
1393 (progn
1394 (require 'hi-lock nil t)
1395 (hi-lock-regexp-okay
1396 (if isearch-regexp isearch-string (regexp-quote isearch-string))))
1397 (hi-lock-read-face-name)))
1398 (isearch-done) 1393 (isearch-done)
1399 (isearch-clean-overlays) 1394 (isearch-clean-overlays)
1395 (require 'hi-lock nil t)
1400 ;; (add-to-history 'hi-lock-regexp-history regexp) 1396 ;; (add-to-history 'hi-lock-regexp-history regexp)
1401 (let ((case-fold-search isearch-case-fold-search)) 1397 (let ((case-fold-search isearch-case-fold-search)
1402 (hi-lock-face-buffer regexp face))) 1398 ;; TODO: add `search-upper-case' as in `isearch-occur'
1399 )
1400 (hi-lock-face-buffer
1401 (hi-lock-regexp-okay
1402 (if isearch-regexp isearch-string (regexp-quote isearch-string)))
1403 (hi-lock-read-face-name))))
1403 1404
1404 1405
1405(defun isearch-delete-char () 1406(defun isearch-delete-char ()