diff options
| author | Richard M. Stallman | 2004-12-03 00:19:52 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-12-03 00:19:52 +0000 |
| commit | 2f4e3f7ac52b6f82e9cd4593f1b9407fbcea7d39 (patch) | |
| tree | 36de0febe0264a902cd4f3cbdb32e08385c7a584 | |
| parent | 9dda72d3ead797bf7ddd2fd6d6f70e206e80f588 (diff) | |
| download | emacs-2f4e3f7ac52b6f82e9cd4593f1b9407fbcea7d39.tar.gz emacs-2f4e3f7ac52b6f82e9cd4593f1b9407fbcea7d39.zip | |
(occur-1): Specify t for KEEP-PROPS to occur-engine.
(occur-engine): Use `face' prop rather than `font-lock-face'
when specifying use of `match-face'.
(occur-accumulate-lines): Change arg from NO-PROPS to KEEP-PROPS.
| -rw-r--r-- | lisp/replace.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 24a6436b4c3..8a5c0a9680c 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -751,7 +751,6 @@ Compatibility function for \\[next-error] invocations." | |||
| 751 | ;; In case the *Occur* buffer is visible in a nonselected window. | 751 | ;; In case the *Occur* buffer is visible in a nonselected window. |
| 752 | (set-window-point (get-buffer-window (current-buffer)) (point)) | 752 | (set-window-point (get-buffer-window (current-buffer)) (point)) |
| 753 | (occur-mode-goto-occurrence))) | 753 | (occur-mode-goto-occurrence))) |
| 754 | |||
| 755 | 754 | ||
| 756 | (defcustom list-matching-lines-default-context-lines 0 | 755 | (defcustom list-matching-lines-default-context-lines 0 |
| 757 | "*Default number of context lines included around `list-matching-lines' matches. | 756 | "*Default number of context lines included around `list-matching-lines' matches. |
| @@ -774,7 +773,7 @@ If the value is nil, don't highlight the buffer names specially." | |||
| 774 | :type 'face | 773 | :type 'face |
| 775 | :group 'matching) | 774 | :group 'matching) |
| 776 | 775 | ||
| 777 | (defun occur-accumulate-lines (count &optional no-props) | 776 | (defun occur-accumulate-lines (count &optional keep-props) |
| 778 | (save-excursion | 777 | (save-excursion |
| 779 | (let ((forwardp (> count 0)) | 778 | (let ((forwardp (> count 0)) |
| 780 | (result nil)) | 779 | (result nil)) |
| @@ -784,9 +783,9 @@ If the value is nil, don't highlight the buffer names specially." | |||
| 784 | (bobp)))) | 783 | (bobp)))) |
| 785 | (setq count (+ count (if forwardp -1 1))) | 784 | (setq count (+ count (if forwardp -1 1))) |
| 786 | (push | 785 | (push |
| 787 | (funcall (if no-props | 786 | (funcall (if keep-props |
| 788 | #'buffer-substring-no-properties | 787 | #'buffer-substring |
| 789 | #'buffer-substring) | 788 | #'buffer-substring-no-properties) |
| 790 | (line-beginning-position) | 789 | (line-beginning-position) |
| 791 | (line-end-position)) | 790 | (line-end-position)) |
| 792 | result) | 791 | result) |
| @@ -921,7 +920,7 @@ See also `multi-occur'." | |||
| 921 | (and case-fold-search | 920 | (and case-fold-search |
| 922 | (isearch-no-upper-case-p regexp t)) | 921 | (isearch-no-upper-case-p regexp t)) |
| 923 | list-matching-lines-buffer-name-face | 922 | list-matching-lines-buffer-name-face |
| 924 | nil list-matching-lines-face nil))) | 923 | nil list-matching-lines-face t))) |
| 925 | (let* ((bufcount (length active-bufs)) | 924 | (let* ((bufcount (length active-bufs)) |
| 926 | (diff (- (length bufs) bufcount))) | 925 | (diff (- (length bufs) bufcount))) |
| 927 | (message "Searched %d buffer%s%s; %s match%s for `%s'" | 926 | (message "Searched %d buffer%s%s; %s match%s for `%s'" |
| @@ -1004,7 +1003,11 @@ See also `multi-occur'." | |||
| 1004 | (append | 1003 | (append |
| 1005 | `(occur-match t) | 1004 | `(occur-match t) |
| 1006 | (when match-face | 1005 | (when match-face |
| 1007 | `(font-lock-face ,match-face))) | 1006 | ;; Use `face' rather than |
| 1007 | ;; `font-lock-face' here | ||
| 1008 | ;; so as to override faces | ||
| 1009 | ;; copied from the buffer. | ||
| 1010 | `(face ,match-face))) | ||
| 1008 | curstring) | 1011 | curstring) |
| 1009 | (setq start (match-end 0)))) | 1012 | (setq start (match-end 0)))) |
| 1010 | ;; Generate the string to insert for this match | 1013 | ;; Generate the string to insert for this match |