diff options
| author | Colin Walters | 2002-05-08 03:53:19 +0000 |
|---|---|---|
| committer | Colin Walters | 2002-05-08 03:53:19 +0000 |
| commit | b052308724bc37b802cb06389bf18948ee51aa6a (patch) | |
| tree | 7087f0a11abd727bd3dfa399ad0975cb2f0420c4 /lisp/replace.el | |
| parent | ba46b4f99beac65697bcaa469cdbf9953995439a (diff) | |
| download | emacs-b052308724bc37b802cb06389bf18948ee51aa6a.tar.gz emacs-b052308724bc37b802cb06389bf18948ee51aa6a.zip | |
(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.el | 13 |
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. | |||
| 468 | (make-local-variable 'revert-buffer-function) | 468 | (make-local-variable 'revert-buffer-function) |
| 469 | (set (make-local-variable 'font-lock-defaults) | 469 | (set (make-local-variable 'font-lock-defaults) |
| 470 | '(nil t nil nil nil | 470 | '(nil t nil nil nil |
| 471 | (font-lock-fontify-region-function . occur-fontify-region-function) | 471 | (font-lock-fontify-region-function . occur-fontify-region-function))) |
| 472 | (font-lock-unfontify-region-function . occur-unfontify-region-function))) | ||
| 473 | (setq revert-buffer-function 'occur-revert-function) | 472 | (setq revert-buffer-function 'occur-revert-function) |
| 474 | (set (make-local-variable 'revert-buffer-function) 'occur-revert-function) | 473 | (set (make-local-variable 'revert-buffer-function) 'occur-revert-function) |
| 475 | (make-local-variable 'occur-revert-arguments) | 474 | (make-local-variable 'occur-revert-arguments) |
| @@ -587,7 +586,7 @@ If the value is nil, don't highlight the buffer names specially." | |||
| 587 | (if forwardp | 586 | (if forwardp |
| 588 | (eobp) | 587 | (eobp) |
| 589 | (bobp)))) | 588 | (bobp)))) |
| 590 | (setq count (+ count (if forwardp 1 -1))) | 589 | (setq count (+ count (if forwardp -1 1))) |
| 591 | (push | 590 | (push |
| 592 | (funcall (if no-props | 591 | (funcall (if no-props |
| 593 | #'buffer-substring-no-properties | 592 | #'buffer-substring-no-properties |
| @@ -803,9 +802,9 @@ See also `multi-occur'." | |||
| 803 | ;; concatenate them all together. | 802 | ;; concatenate them all together. |
| 804 | (apply #'concat | 803 | (apply #'concat |
| 805 | (nconc | 804 | (nconc |
| 806 | (occur-engine-add-prefix (nreverse (cdr (occur-accumulate-lines (- (1+ nlines)) t)))) | 805 | (occur-engine-add-prefix (nreverse (cdr (occur-accumulate-lines (- (1+ nlines)) keep-props)))) |
| 807 | (list out-line) | 806 | (list out-line) |
| 808 | (occur-engine-add-prefix (cdr (occur-accumulate-lines (1+ nlines) t)))))))) | 807 | (occur-engine-add-prefix (cdr (occur-accumulate-lines (1+ nlines) keep-props)))))))) |
| 809 | ;; Actually insert the match display data | 808 | ;; Actually insert the match display data |
| 810 | (with-current-buffer out-buf | 809 | (with-current-buffer out-buf |
| 811 | (let ((beg (point)) | 810 | (let ((beg (point)) |
| @@ -863,10 +862,6 @@ See also `multi-occur'." | |||
| 863 | (goto-char change-end)))))) | 862 | (goto-char change-end)))))) |
| 864 | (when verbose (message "Fontifying...done"))) | 863 | (when verbose (message "Fontifying...done"))) |
| 865 | 864 | ||
| 866 | (defun occur-unfontify-region-function (beg end) | ||
| 867 | (let ((inhibit-read-only t)) | ||
| 868 | (remove-text-properties beg end '(face nil)))) | ||
| 869 | |||
| 870 | 865 | ||
| 871 | ;; It would be nice to use \\[...], but there is no reasonable way | 866 | ;; It would be nice to use \\[...], but there is no reasonable way |
| 872 | ;; to make that display both SPC and Y. | 867 | ;; to make that display both SPC and Y. |