comparison lisp/replace.el @ 44853:ca887baefc80

(multi-occur-by-filename-regexp): Doc fix. (occur-engine): Go to `point-min'.
author Colin Walters <walters@gnu.org>
date Thu, 25 Apr 2002 19:02:46 +0000
parents d60f225edddc
children 72ec4ee68d47
comparison
equal deleted inserted replaced
44852:da382d6ab565 44853:ca887baefc80
653 (nreverse (mapcar #'get-buffer bufs))) 653 (nreverse (mapcar #'get-buffer bufs)))
654 (occur-read-primary-args))) 654 (occur-read-primary-args)))
655 (occur-1 regexp nlines bufs)) 655 (occur-1 regexp nlines bufs))
656 656
657 (defun multi-occur-by-filename-regexp (bufregexp regexp &optional nlines) 657 (defun multi-occur-by-filename-regexp (bufregexp regexp &optional nlines)
658 "Show all lines in buffers containing REGEXP, named by BUFREGEXP. 658 "Show all lines matching REGEXP in buffers named by BUFREGEXP.
659 See also `multi-occur'." 659 See also `multi-occur'."
660 (interactive 660 (interactive
661 (cons 661 (cons
662 (let* ((default (car regexp-history)) 662 (let* ((default (car regexp-history))
663 (input 663 (input
699 (format "%d" count)) 699 (format "%d" count))
700 regexp) 700 regexp)
701 (if (> count 0) 701 (if (> count 0)
702 (display-buffer occur-buf) 702 (display-buffer occur-buf)
703 (kill-buffer occur-buf))) 703 (kill-buffer occur-buf)))
704 (goto-char (point-min))
705 (setq occur-revert-properties (list regexp nlines bufs) 704 (setq occur-revert-properties (list regexp nlines bufs)
706 buffer-read-only t)))) 705 buffer-read-only t))))
707 706
708 ;; Most of these are macros becuase if we used `flet', it wouldn't 707 ;; Most of these are macros becuase if we used `flet', it wouldn't
709 ;; create a closure, so things would blow up at run time. Ugh. :( 708 ;; create a closure, so things would blow up at run time. Ugh. :(
816 (add-text-properties beg end 815 (add-text-properties beg end
817 (append 816 (append
818 (when title-face 817 (when title-face
819 `(face ,title-face)) 818 `(face ,title-face))
820 `(occur-title ,buf)))) 819 `(occur-title ,buf))))
821 (goto-char (point-max))))))) 820 (goto-char (point-min)))))))
822 ;; Return the number of matches 821 ;; Return the number of matches
823 globalcount)))) 822 globalcount))))
824 823
825 (defun occur-fontify-on-property (prop face beg end) 824 (defun occur-fontify-on-property (prop face beg end)
826 (let ((prop-beg (or (and (get-text-property (point) prop) (point)) 825 (let ((prop-beg (or (and (get-text-property (point) prop) (point))