773 |
title-face prefix-face match-face keep-props) |
title-face prefix-face match-face keep-props) |
774 |
(with-current-buffer out-buf |
(with-current-buffer out-buf |
775 |
(setq buffer-read-only nil) |
(setq buffer-read-only nil) |
776 |
(let ((globalcount 0)) |
(let ((globalcount 0) |
777 |
|
(coding nil)) |
778 |
;; Map over all the buffers |
;; Map over all the buffers |
779 |
(dolist (buf buffers) |
(dolist (buf buffers) |
780 |
(when (buffer-live-p buf) |
(when (buffer-live-p buf) |
790 |
(headerpt (with-current-buffer out-buf (point)))) |
(headerpt (with-current-buffer out-buf (point)))) |
791 |
(save-excursion |
(save-excursion |
792 |
(set-buffer buf) |
(set-buffer buf) |
793 |
|
(or coding |
794 |
|
;; Set CODING only if the current buffer locally |
795 |
|
;; binds buffer-file-coding-system. |
796 |
|
(not (local-variable-p 'buffer-file-coding-system)) |
797 |
|
(setq coding buffer-file-coding-system)) |
798 |
(save-excursion |
(save-excursion |
799 |
(goto-char (point-min)) ;; begin searching in the buffer |
(goto-char (point-min)) ;; begin searching in the buffer |
800 |
(while (not (eobp)) |
(while (not (eobp)) |
884 |
`(font-lock-face ,title-face)) |
`(font-lock-face ,title-face)) |
885 |
`(occur-title ,buf)))) |
`(occur-title ,buf)))) |
886 |
(goto-char (point-min))))))) |
(goto-char (point-min))))))) |
887 |
|
(if coding |
888 |
|
;; CODING is buffer-file-coding-system of the first buffer |
889 |
|
;; that locally binds it. Let's use it also for the output |
890 |
|
;; buffer. |
891 |
|
(set-buffer-file-coding-system coding)) |
892 |
;; Return the number of matches |
;; Return the number of matches |
893 |
globalcount))) |
globalcount))) |
894 |
|
|