Mercurial > emacs
changeset 97156:0d4402806108
(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.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Thu, 31 Jul 2008 17:19:28 +0000 |
parents | b4faea6c6c00 |
children | 5e1a3afd2217 |
files | lisp/isearch.el |
diffstat | 1 files changed, 21 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/isearch.el Thu Jul 31 17:18:33 2008 +0000 +++ b/lisp/isearch.el Thu Jul 31 17:19:28 2008 +0000 @@ -684,8 +684,8 @@ "\ Do incremental search forward for regular expression. With a prefix argument, do a regular string search instead. -Like ordinary incremental search except that your input -is treated as a regexp. See \\[isearch-forward] for more info. +Like ordinary incremental search except that your input is treated +as a regexp. See the command `isearch-forward' for more information. In regexp incremental searches, a space or spaces normally matches any whitespace (the variable `search-whitespace-regexp' controls @@ -698,9 +698,9 @@ "\ Do incremental search forward for a sequence of words. With a prefix argument, do a regular string search instead. -Like ordinary incremental search except that your input -is treated as a sequence of words without regard to how the -words are separated. See \\[isearch-forward] for more info." +Like ordinary incremental search except that your input is treated +as a sequence of words without regard to how the words are separated. +See the command `isearch-forward' for more information." (interactive "P\np") (isearch-mode t nil nil (not no-recursive-edit) (null not-word))) @@ -708,7 +708,7 @@ "\ Do incremental search backward. With a prefix argument, do a regular expression search instead. -See \\[isearch-forward] for more information." +See the command `isearch-forward' for more information." (interactive "P\np") (isearch-mode nil (not (null regexp-p)) nil (not no-recursive-edit))) @@ -716,8 +716,8 @@ "\ Do incremental search backward for regular expression. With a prefix argument, do a regular string search instead. -Like ordinary incremental search except that your input -is treated as a regexp. See \\[isearch-forward] for more info." +Like ordinary incremental search except that your input is treated +as a regexp. See the command `isearch-forward' for more information." (interactive "P\np") (isearch-mode nil (null not-regexp) nil (not no-recursive-edit))) @@ -1384,22 +1384,23 @@ (declare-function hi-lock-regexp-okay "hi-lock" (regexp)) (declare-function hi-lock-read-face-name "hi-lock" ()) -(defun isearch-highlight-regexp (regexp &optional face) +(defun isearch-highlight-regexp () "Run `highlight-regexp' with regexp from the current search string. -Interactively, REGEXP is the current search regexp or a quoted search -string. FACE has the same meaning as in `highlight-regexp'." - (interactive - (list - (progn - (require 'hi-lock nil t) - (hi-lock-regexp-okay - (if isearch-regexp isearch-string (regexp-quote isearch-string)))) - (hi-lock-read-face-name))) +It exits Isearch mode and calls `hi-lock-face-buffer' with its regexp +argument from the last search regexp or a quoted search string, +and reads its face argument using `hi-lock-read-face-name'." + (interactive) (isearch-done) (isearch-clean-overlays) + (require 'hi-lock nil t) ;; (add-to-history 'hi-lock-regexp-history regexp) - (let ((case-fold-search isearch-case-fold-search)) - (hi-lock-face-buffer regexp face))) + (let ((case-fold-search isearch-case-fold-search) + ;; TODO: add `search-upper-case' as in `isearch-occur' + ) + (hi-lock-face-buffer + (hi-lock-regexp-okay + (if isearch-regexp isearch-string (regexp-quote isearch-string))) + (hi-lock-read-face-name)))) (defun isearch-delete-char ()