diff options
| author | Michael Kifer | 2000-04-07 16:10:04 +0000 |
|---|---|---|
| committer | Michael Kifer | 2000-04-07 16:10:04 +0000 |
| commit | d35bee0ea6fd4db8a1ff830a34d64b4ffc87ccb4 (patch) | |
| tree | deca25f42677671610517d7d62bcef3a3d91b001 /lisp/emulation/viper-util.el | |
| parent | c0333abccb3e0997fad7d6a62bc317a49fbf6d07 (diff) | |
| download | emacs-d35bee0ea6fd4db8a1ff830a34d64b4ffc87ccb4.tar.gz emacs-d35bee0ea6fd4db8a1ff830a34d64b4ffc87ccb4.zip | |
2000-04-07 Mikio Nakajima <minakaji@osaka.email.ne.jp>
* viper-util.el (viper-put-on-search-overlay): New subroutine.
(viper-flash-search-pattern): No operation when using Emacs
doesn't support face.
Use `viper-put-on-search-overlay'.
Diffstat (limited to 'lisp/emulation/viper-util.el')
| -rw-r--r-- | lisp/emulation/viper-util.el | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index b384710e1e3..8d7a749d15e 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el | |||
| @@ -680,25 +680,31 @@ | |||
| 680 | 680 | ||
| 681 | 681 | ||
| 682 | ;;; Overlays | 682 | ;;; Overlays |
| 683 | (defun viper-put-on-search-overlay (beg end) | ||
| 684 | (if (viper-overlay-p viper-search-overlay) | ||
| 685 | (viper-move-overlay viper-search-overlay beg end) | ||
| 686 | (setq viper-search-overlay (viper-make-overlay beg end (current-buffer))) | ||
| 687 | (viper-overlay-put | ||
| 688 | viper-search-overlay 'priority viper-search-overlay-priority)) | ||
| 689 | (viper-overlay-put viper-search-overlay 'face viper-search-face)) | ||
| 683 | 690 | ||
| 684 | ;; Search | 691 | ;; Search |
| 685 | 692 | ||
| 686 | (defun viper-flash-search-pattern () | 693 | (defun viper-flash-search-pattern () |
| 687 | (if (viper-overlay-p viper-search-overlay) | 694 | (if (not (viper-has-face-support-p)) |
| 688 | (viper-move-overlay | 695 | nil |
| 689 | viper-search-overlay (match-beginning 0) (match-end 0)) | 696 | (viper-put-on-search-overlay (match-beginning 0) (match-end 0)) |
| 690 | (setq viper-search-overlay | 697 | (sit-for 2) |
| 691 | (viper-make-overlay | 698 | (viper-overlay-put viper-search-overlay 'face nil))) |
| 692 | (match-beginning 0) (match-end 0) (current-buffer)))) | 699 | |
| 693 | 700 | (defun viper-hide-search-overlay () | |
| 694 | (viper-overlay-put | 701 | (if (not (viper-overlay-p viper-search-overlay)) |
| 695 | viper-search-overlay 'priority viper-search-overlay-priority) | ||
| 696 | (if (viper-has-face-support-p) | ||
| 697 | (progn | 702 | (progn |
| 698 | (viper-overlay-put viper-search-overlay 'face viper-search-face) | 703 | (setq viper-search-overlay |
| 699 | (sit-for 2) | 704 | (viper-make-overlay beg end (current-buffer))) |
| 700 | (viper-overlay-put viper-search-overlay 'face nil)))) | 705 | (viper-overlay-put |
| 701 | 706 | viper-search-overlay 'priority viper-search-overlay-priority))) | |
| 707 | (viper-overlay-put viper-search-overlay 'face nil)) | ||
| 702 | 708 | ||
| 703 | ;; Replace state | 709 | ;; Replace state |
| 704 | 710 | ||