# HG changeset patch # User Thien-Thi Nguyen # Date 1182501652 0 # Node ID 8ee965d8fb172dda97d540235112f2dc8f609b94 # Parent 1145822df47ec3b0b8b2434a9924bad062df2bd3 (hs-hide-all): Use progress reporter. diff -r 1145822df47e -r 8ee965d8fb17 lisp/progmodes/hideshow.el --- a/lisp/progmodes/hideshow.el Fri Jun 22 08:15:02 2007 +0000 +++ b/lisp/progmodes/hideshow.el Fri Jun 22 08:40:52 2007 +0000 @@ -733,12 +733,12 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments." (interactive) (hs-life-goes-on - (message "Hiding all blocks ...") (save-excursion (unless hs-allow-nesting (hs-discard-overlays (point-min) (point-max))) (goto-char (point-min)) - (let ((count 0) + (let ((spew (make-progress-reporter "Hiding all blocks..." + (point-min) (point-max))) (re (concat "\\(" hs-block-start-regexp "\\)" @@ -764,9 +764,9 @@ (if (> (count-lines (car c-reg) (nth 1 c-reg)) 1) (hs-hide-block-at-point t c-reg) (goto-char (nth 1 c-reg)))))) - (message "Hiding ... %d" (setq count (1+ count)))))) + (progress-reporter-update spew (point))) + (progress-reporter-done spew))) (beginning-of-line) - (message "Hiding all blocks ... done") (run-hooks 'hs-hide-hook))) (defun hs-show-all ()