]> git.eshelyaron.com Git - emacs.git/commitdiff
(occur-accumulate-lines): Add optional argument `no-props'. Handle it.
authorColin Walters <walters@gnu.org>
Wed, 24 Apr 2002 23:28:53 +0000 (23:28 +0000)
committerColin Walters <walters@gnu.org>
Wed, 24 Apr 2002 23:28:53 +0000 (23:28 +0000)
(occur-engine): Use it.

lisp/ChangeLog
lisp/replace.el

index 576ddaef86dc4935842c9d6aab76e4607319b095..8deeadac3aeabd683858eec8f665a1372c87c5a3 100644 (file)
@@ -1,5 +1,9 @@
 2002-04-24  Colin Walters  <walters@verbum.org>
 
+       * replace.el (occur-accumulate-lines): Add optional argument
+       `no-props'.  Handle it.
+       (occur-engine): Use it.
+
        * ibuf-ext.el (toplevel): Remove byte-compile-dynamic.  Try to set
        up autoloads manually.
        (ibuffer-split-list): New function.
index ad197fff56f99296b81105e02acc9adebab8bfe0..d34916b0b2820a9ef5725df5ea79976c7c95dba7 100644 (file)
@@ -579,7 +579,7 @@ If the value is nil, don't highlight the buffer names specially."
   :type 'face
   :group 'matching)
 
-(defun occur-accumulate-lines (count)
+(defun occur-accumulate-lines (count &optional no-props)
   (save-excursion
     (let ((forwardp (> count 0))
          (result nil))
@@ -591,7 +591,9 @@ If the value is nil, don't highlight the buffer names specially."
            (decf count)
          (incf count))
        (push
-        (buffer-substring
+        (funcall (if no-props
+                     #'buffer-substring-no-properties
+                   #'buffer-substring)
          (line-beginning-position)
          (line-end-position))
         result)
@@ -786,9 +788,9 @@ See also `multi-occur'."
                                 ;; concatenate them all together.
                                 (apply #'concat
                                        (nconc
-                                        (add-prefix (nreverse (cdr (occur-accumulate-lines (- nlines)))))
+                                        (add-prefix (nreverse (cdr (occur-accumulate-lines (- nlines) t))))
                                         (list out-line)
-                                        (add-prefix (cdr (occur-accumulate-lines nlines))))))))
+                                        (add-prefix (cdr (occur-accumulate-lines nlines t))))))))
                          ;; Actually insert the match display data
                          (with-current-buffer out-buf
                            (let ((beg (point))