From: Thien-Thi Nguyen Date: Fri, 22 Jun 2007 08:41:25 +0000 (+0000) Subject: (hs-hide-all): Use progress reporter. X-Git-Tag: emacs-pretest-23.0.90~12156 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=31a0385deed474cdffb373c4b13cfb58c7d4932d;p=emacs.git (hs-hide-all): Use progress reporter. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5a7b81d40d1..c6ca51424bc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 * calc/calc-comb.el (math-small-factorial-table): New variable. diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index f39fb477c9e..7720b441700 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -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 ()