aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorColin Walters2002-04-24 23:28:53 +0000
committerColin Walters2002-04-24 23:28:53 +0000
commit9e2b2e3071102e98f088d880fa0bcf4cb15c733a (patch)
treec3c3e0c316caa7a1293a19a522002fe9aecc3c75 /lisp/replace.el
parent76649361238ad6e05a3bed229be05922ef795533 (diff)
downloademacs-9e2b2e3071102e98f088d880fa0bcf4cb15c733a.tar.gz
emacs-9e2b2e3071102e98f088d880fa0bcf4cb15c733a.zip
(occur-accumulate-lines): Add optional argument `no-props'. Handle it.
(occur-engine): Use it.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index ad197fff56f..d34916b0b28 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -579,7 +579,7 @@ If the value is nil, don't highlight the buffer names specially."
579 :type 'face 579 :type 'face
580 :group 'matching) 580 :group 'matching)
581 581
582(defun occur-accumulate-lines (count) 582(defun occur-accumulate-lines (count &optional no-props)
583 (save-excursion 583 (save-excursion
584 (let ((forwardp (> count 0)) 584 (let ((forwardp (> count 0))
585 (result nil)) 585 (result nil))
@@ -591,7 +591,9 @@ If the value is nil, don't highlight the buffer names specially."
591 (decf count) 591 (decf count)
592 (incf count)) 592 (incf count))
593 (push 593 (push
594 (buffer-substring 594 (funcall (if no-props
595 #'buffer-substring-no-properties
596 #'buffer-substring)
595 (line-beginning-position) 597 (line-beginning-position)
596 (line-end-position)) 598 (line-end-position))
597 result) 599 result)
@@ -786,9 +788,9 @@ See also `multi-occur'."
786 ;; concatenate them all together. 788 ;; concatenate them all together.
787 (apply #'concat 789 (apply #'concat
788 (nconc 790 (nconc
789 (add-prefix (nreverse (cdr (occur-accumulate-lines (- nlines))))) 791 (add-prefix (nreverse (cdr (occur-accumulate-lines (- nlines) t))))
790 (list out-line) 792 (list out-line)
791 (add-prefix (cdr (occur-accumulate-lines nlines)))))))) 793 (add-prefix (cdr (occur-accumulate-lines nlines t))))))))
792 ;; Actually insert the match display data 794 ;; Actually insert the match display data
793 (with-current-buffer out-buf 795 (with-current-buffer out-buf
794 (let ((beg (point)) 796 (let ((beg (point))