Mercurial > emacs
comparison lisp/isearch.el @ 83408:39bb10ce301a
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-667
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-669
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-670
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-157
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-158
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-159
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-160
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-161
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-162
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-163
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-164
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-165
Update from CVS: texi/message.texi: Fix default values.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-166
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-167
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-168
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-448
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 11 Dec 2005 22:42:40 +0000 |
parents | 1955a4462bf9 e6b4f7137699 |
children | 14a4eb789b45 |
comparison
equal
deleted
inserted
replaced
83407:37d0562504bf | 83408:39bb10ce301a |
---|---|
1807 ((memq char '(?* ??)) (isearch-fallback nil)) | 1807 ((memq char '(?* ??)) (isearch-fallback nil)) |
1808 ((eq char ?\}) (isearch-fallback t t)) | 1808 ((eq char ?\}) (isearch-fallback t t)) |
1809 ((eq char ?|) (isearch-fallback t nil t))) | 1809 ((eq char ?|) (isearch-fallback t nil t))) |
1810 | 1810 |
1811 ;; Append the char to the search string, update the message and re-search. | 1811 ;; Append the char to the search string, update the message and re-search. |
1812 (if (char-table-p translation-table-for-input) | |
1813 (setq char (or (aref translation-table-for-input char) char))) | |
1812 (isearch-process-search-string | 1814 (isearch-process-search-string |
1813 (char-to-string char) | 1815 (char-to-string char) |
1814 (if (>= char ?\200) | 1816 (if (>= char ?\200) |
1815 (char-to-string char) | 1817 (char-to-string char) |
1816 (isearch-text-char-description char)))) | 1818 (isearch-text-char-description char)))) |
2233 ;; Highlighting | 2235 ;; Highlighting |
2234 | 2236 |
2235 (defvar isearch-overlay nil) | 2237 (defvar isearch-overlay nil) |
2236 | 2238 |
2237 (defun isearch-highlight (beg end) | 2239 (defun isearch-highlight (beg end) |
2238 (unless (null search-highlight) | 2240 (if search-highlight |
2239 (cond (isearch-overlay | 2241 (if isearch-overlay |
2240 ;; Overlay already exists, just move it. | 2242 ;; Overlay already exists, just move it. |
2241 (move-overlay isearch-overlay beg end (current-buffer))) | 2243 (move-overlay isearch-overlay beg end (current-buffer)) |
2242 | 2244 ;; Overlay doesn't exist, create it. |
2243 (t | 2245 (setq isearch-overlay (make-overlay beg end)) |
2244 ;; Overlay doesn't exist, create it. | 2246 ;; 1001 is higher than lazy's 1000 and ediff's 100+ |
2245 (setq isearch-overlay (make-overlay beg end)) | 2247 (overlay-put isearch-overlay 'priority 1001) |
2246 (overlay-put isearch-overlay 'face isearch) | 2248 (overlay-put isearch-overlay 'face isearch)))) |
2247 (overlay-put isearch-overlay 'priority 1) ;higher than lazy overlays | |
2248 )))) | |
2249 | 2249 |
2250 (defun isearch-dehighlight () | 2250 (defun isearch-dehighlight () |
2251 (when isearch-overlay | 2251 (when isearch-overlay |
2252 (delete-overlay isearch-overlay))) | 2252 (delete-overlay isearch-overlay))) |
2253 | 2253 |
2407 (forward-char -1))) | 2407 (forward-char -1))) |
2408 | 2408 |
2409 ;; non-zero-length match | 2409 ;; non-zero-length match |
2410 (let ((ov (make-overlay mb me))) | 2410 (let ((ov (make-overlay mb me))) |
2411 (push ov isearch-lazy-highlight-overlays) | 2411 (push ov isearch-lazy-highlight-overlays) |
2412 ;; 1000 is higher than ediff's 100+, | |
2413 ;; but lower than isearch main overlay's 1001 | |
2414 (overlay-put ov 'priority 1000) | |
2412 (overlay-put ov 'face lazy-highlight-face) | 2415 (overlay-put ov 'face lazy-highlight-face) |
2413 (overlay-put ov 'priority 0) ;lower than main overlay | |
2414 (overlay-put ov 'window (selected-window)))) | 2416 (overlay-put ov 'window (selected-window)))) |
2415 (if isearch-forward | 2417 (if isearch-forward |
2416 (setq isearch-lazy-highlight-end (point)) | 2418 (setq isearch-lazy-highlight-end (point)) |
2417 (setq isearch-lazy-highlight-start (point))))) | 2419 (setq isearch-lazy-highlight-start (point))))) |
2418 | 2420 |