changeset 81557:8ee965d8fb17

(hs-hide-all): Use progress reporter.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Fri, 22 Jun 2007 08:40:52 +0000
parents 1145822df47e
children 9bdc3e434294
files lisp/progmodes/hideshow.el
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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 ()