summaryrefslogtreecommitdiff
path: root/lisp/view.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-10-09 19:42:19 +0000
committerRichard M. Stallman <rms@gnu.org>1995-10-09 19:42:19 +0000
commit82380f84741972748266ce65c7864146f753981c (patch)
tree539fca78d02fdcec726a04675230de3757c5e177 /lisp/view.el
parentab4b18358fa636b07dd0fa88d54a2f8d89ef0079 (diff)
downloademacs-82380f84741972748266ce65c7864146f753981c.tar.gz
(view-highlight-face): New variable.
(view-search): Use that variable.
Diffstat (limited to 'lisp/view.el')
-rw-r--r--lisp/view.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/view.el b/lisp/view.el
index 5e3069efb46..32c2285c311 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -28,6 +28,10 @@
;;; Code:
+;;;###autoload
+(defvar view-highlight-face 'highlight
+ "*The overlay face used for highlighting the match found by View mode search.")
+
(defvar view-mode nil "Non-nil if View mode is enabled.")
(make-variable-buffer-local 'view-mode)
@@ -54,7 +58,8 @@
(make-variable-buffer-local 'view-exit-position)
(defvar view-overlay nil
- "Overlay used to display where a search operation found its match.")
+ "Overlay used to display where a search operation found its match.
+This is local in each buffer, once it is used.")
(make-variable-buffer-local 'view-overlay)
(or (assq 'view-mode minor-mode-alist)
@@ -425,7 +430,7 @@ invocations return to earlier marks."
(move-overlay view-overlay (match-beginning 0) (match-end 0))
(setq view-overlay
(make-overlay (match-beginning 0) (match-end 0))))
- (overlay-put view-overlay 'face 'highlight)
+ (overlay-put view-overlay 'face view-highlight-face)
(beginning-of-line)
(recenter (/ (view-window-size) 2)))
(message "Can't find occurrence %d of %s" times regexp)