]> git.eshelyaron.com Git - emacs.git/commitdiff
* replace.el (occur-engine-line): Add optional arg `keep-props'.
authorJuri Linkov <juri@jurta.org>
Tue, 23 Mar 2010 15:48:09 +0000 (17:48 +0200)
committerJuri Linkov <juri@jurta.org>
Tue, 23 Mar 2010 15:48:09 +0000 (17:48 +0200)
(occur-accumulate-lines, occur-engine): Add arg `keep-props'.

lisp/ChangeLog
lisp/replace.el

index 77bd0fa182680f5ca6ef46105f54e9af809b67aa..b84b8436993d536f83625d01272e5548ac077649 100644 (file)
@@ -5,6 +5,9 @@
        (occur-engine-line): New function created from duplicate code
        in `occur-accumulate-lines' and `occur-engine'.
 
+       * replace.el (occur-engine-line): Add optional arg `keep-props'.
+       (occur-accumulate-lines, occur-engine): Add arg `keep-props'.
+
 2010-03-23  Juri Linkov  <juri@jurta.org>
 
        * finder.el: Remove TODO tasks.
index 613cced8ea5d7825b78711e041f2227af02a18a5..f2d49b4de1c2c23a238b14591d794f0735ccdc38 100644 (file)
@@ -1016,7 +1016,7 @@ which means to discard all text properties."
        (setq count (+ count (if forwardp -1 1)))
        (setq beg (line-beginning-position)
              end (line-end-position))
-       (push (occur-engine-line beg end) result)
+       (push (occur-engine-line beg end keep-props) result)
        (forward-line (if forwardp 1 -1)))
       (nreverse result))))
 
@@ -1217,7 +1217,7 @@ See also `multi-occur'."
                            endpt (line-end-position)))
                    (setq marker (make-marker))
                    (set-marker marker matchbeg)
-                   (setq curstring (occur-engine-line begpt endpt))
+                   (setq curstring (occur-engine-line begpt endpt keep-props))
                    ;; Highlight the matches
                    (let ((len (length curstring))
                          (start 0))
@@ -1314,7 +1314,7 @@ See also `multi-occur'."
       ;; Return the number of matches
       globalcount)))
 
-(defun occur-engine-line (beg end)
+(defun occur-engine-line (beg end &optional keep-props)
   (if (and keep-props (if (boundp 'jit-lock-mode) jit-lock-mode)
           (text-property-not-all beg end 'fontified t))
       (if (fboundp 'jit-lock-fontify-now)