# HG changeset patch # User Juri Linkov # Date 1269359289 -7200 # Node ID 7913a8c227bd3daa543ac13e3fba39feac45505d # Parent f7e5232d459a4593930c5f35c227d0c2434c0f24 * replace.el (occur-engine-line): Add optional arg `keep-props'. (occur-accumulate-lines, occur-engine): Add arg `keep-props'. diff -r f7e5232d459a -r 7913a8c227bd lisp/ChangeLog --- a/lisp/ChangeLog Tue Mar 23 07:38:13 2010 +0000 +++ b/lisp/ChangeLog Tue Mar 23 17:48:09 2010 +0200 @@ -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 * finder.el: Remove TODO tasks. diff -r f7e5232d459a -r 7913a8c227bd lisp/replace.el --- a/lisp/replace.el Tue Mar 23 07:38:13 2010 +0000 +++ b/lisp/replace.el Tue Mar 23 17:48:09 2010 +0200 @@ -1016,7 +1016,7 @@ (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 @@ 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 @@ ;; 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)