diff options
| author | Juri Linkov | 2008-07-31 17:19:28 +0000 |
|---|---|---|
| committer | Juri Linkov | 2008-07-31 17:19:28 +0000 |
| commit | 8938c0bc9c82fd25186d5e23da83dee696738c22 (patch) | |
| tree | 17480bc6255d1071b57568e8dc9da6c6a7ffa10f | |
| parent | 03d3db39f630bbdf393ce8219da35a0efa3bb16b (diff) | |
| download | emacs-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.el | 41 |
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 | "\ |
| 685 | Do incremental search forward for regular expression. | 685 | Do incremental search forward for regular expression. |
| 686 | With a prefix argument, do a regular string search instead. | 686 | With a prefix argument, do a regular string search instead. |
| 687 | Like ordinary incremental search except that your input | 687 | Like ordinary incremental search except that your input is treated |
| 688 | is treated as a regexp. See \\[isearch-forward] for more info. | 688 | as a regexp. See the command `isearch-forward' for more information. |
| 689 | 689 | ||
| 690 | In regexp incremental searches, a space or spaces normally matches | 690 | In regexp incremental searches, a space or spaces normally matches |
| 691 | any whitespace (the variable `search-whitespace-regexp' controls | 691 | any whitespace (the variable `search-whitespace-regexp' controls |
| @@ -698,9 +698,9 @@ and nothing else, enter C-q SPC." | |||
| 698 | "\ | 698 | "\ |
| 699 | Do incremental search forward for a sequence of words. | 699 | Do incremental search forward for a sequence of words. |
| 700 | With a prefix argument, do a regular string search instead. | 700 | With a prefix argument, do a regular string search instead. |
| 701 | Like ordinary incremental search except that your input | 701 | Like ordinary incremental search except that your input is treated |
| 702 | is treated as a sequence of words without regard to how the | 702 | as a sequence of words without regard to how the words are separated. |
| 703 | words are separated. See \\[isearch-forward] for more info." | 703 | See 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 | "\ |
| 709 | Do incremental search backward. | 709 | Do incremental search backward. |
| 710 | With a prefix argument, do a regular expression search instead. | 710 | With a prefix argument, do a regular expression search instead. |
| 711 | See \\[isearch-forward] for more information." | 711 | See 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 | "\ |
| 717 | Do incremental search backward for regular expression. | 717 | Do incremental search backward for regular expression. |
| 718 | With a prefix argument, do a regular string search instead. | 718 | With a prefix argument, do a regular string search instead. |
| 719 | Like ordinary incremental search except that your input | 719 | Like ordinary incremental search except that your input is treated |
| 720 | is treated as a regexp. See \\[isearch-forward] for more info." | 720 | as 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. |
| 1389 | Interactively, REGEXP is the current search regexp or a quoted search | 1389 | It exits Isearch mode and calls `hi-lock-face-buffer' with its regexp |
| 1390 | string. FACE has the same meaning as in `highlight-regexp'." | 1390 | argument from the last search regexp or a quoted search string, |
| 1391 | (interactive | 1391 | and 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 () |