]> git.eshelyaron.com Git - emacs.git/commitdiff
(hs-hide-all): Use progress reporter.
authorThien-Thi Nguyen <ttn@gnuvola.org>
Fri, 22 Jun 2007 08:41:25 +0000 (08:41 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Fri, 22 Jun 2007 08:41:25 +0000 (08:41 +0000)
lisp/ChangeLog
lisp/progmodes/hideshow.el

index 5a7b81d40d1afcb69c6d69372b4369fa56e505c7..c6ca51424bc65e25cb5e60baaf25124545cad16e 100644 (file)
@@ -7,6 +7,8 @@
        * progmodes/hideshow.el (hs-show-block): Use line-end-position.
        (hs-hide-block-at-point, hs-hide-comment-region): Likewise.
 
+       * progmodes/hideshow.el (hs-hide-all): Use progress reporter.
+
 2007-06-22  Jay Belanger  <jay.p.belanger@gmail.com>
 
        * calc/calc-comb.el (math-small-factorial-table): New variable.
index f39fb477c9e1ecda79fabad18c3702b34a941a69..7720b441700dbf641c0bff2938778ca8a3ea541d 100644 (file)
@@ -733,12 +733,12 @@ Move point to the beginning of the line, and run the normal hook
 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 `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments."
                (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 ()