/[emacs]/emacs/lisp/replace.el
ViewVC logotype

Diff of /emacs/lisp/replace.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.161 by rms, Wed Nov 6 05:08:16 2002 UTC revision 1.162 by handa, Wed Nov 13 07:06:07 2002 UTC
# Line 773  See also `multi-occur'." Line 773  See also `multi-occur'."
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)
# Line 789  See also `multi-occur'." Line 790  See also `multi-occur'."
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))
# Line 878  See also `multi-occur'." Line 884  See also `multi-occur'."
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    

Legend:
Removed from v.1.161  
changed lines
  Added in v.1.162

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26