summaryrefslogtreecommitdiff
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorColin Walters <walters@gnu.org>2002-05-08 03:53:19 +0000
committerColin Walters <walters@gnu.org>2002-05-08 03:53:19 +0000
commitb052308724bc37b802cb06389bf18948ee51aa6a (patch)
tree7087f0a11abd727bd3dfa399ad0975cb2f0420c4 /lisp/replace.el
parentba46b4f99beac65697bcaa469cdbf9953995439a (diff)
downloademacs-b052308724bc37b802cb06389bf18948ee51aa6a.tar.gz
(occur-unfontify-region-function): Delete.
(occur-mode): Don't use it. (occur-engine): Respect `keep-props'. (occur-accumulate-lines): If we're moving forward, decrement; don't increment, and vice versa.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el13
1 files changed, 4 insertions, 9 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 4294428c45e..a81979531e6 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -468,8 +468,7 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it.
(make-local-variable 'revert-buffer-function)
(set (make-local-variable 'font-lock-defaults)
'(nil t nil nil nil
- (font-lock-fontify-region-function . occur-fontify-region-function)
- (font-lock-unfontify-region-function . occur-unfontify-region-function)))
+ (font-lock-fontify-region-function . occur-fontify-region-function)))
(setq revert-buffer-function 'occur-revert-function)
(set (make-local-variable 'revert-buffer-function) 'occur-revert-function)
(make-local-variable 'occur-revert-arguments)
@@ -587,7 +586,7 @@ If the value is nil, don't highlight the buffer names specially."
(if forwardp
(eobp)
(bobp))))
- (setq count (+ count (if forwardp 1 -1)))
+ (setq count (+ count (if forwardp -1 1)))
(push
(funcall (if no-props
#'buffer-substring-no-properties
@@ -803,9 +802,9 @@ See also `multi-occur'."
;; concatenate them all together.
(apply #'concat
(nconc
- (occur-engine-add-prefix (nreverse (cdr (occur-accumulate-lines (- (1+ nlines)) t))))
+ (occur-engine-add-prefix (nreverse (cdr (occur-accumulate-lines (- (1+ nlines)) keep-props))))
(list out-line)
- (occur-engine-add-prefix (cdr (occur-accumulate-lines (1+ nlines) t))))))))
+ (occur-engine-add-prefix (cdr (occur-accumulate-lines (1+ nlines) keep-props))))))))
;; Actually insert the match display data
(with-current-buffer out-buf
(let ((beg (point))
@@ -863,10 +862,6 @@ See also `multi-occur'."
(goto-char change-end))))))
(when verbose (message "Fontifying...done")))
-(defun occur-unfontify-region-function (beg end)
- (let ((inhibit-read-only t))
- (remove-text-properties beg end '(face nil))))
-
;; It would be nice to use \\[...], but there is no reasonable way
;; to make that display both SPC and Y.