aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2005-03-20 20:59:52 +0000
committerJuri Linkov2005-03-20 20:59:52 +0000
commitfe6b1dbdc696ab68c8bd88b6e1276d7a7d4220ca (patch)
tree9f266afed51e29cbaa8f101235ced08294d66eb7
parent340b8d4f63cd3d20a3c1883b78111e3768c0265b (diff)
downloademacs-fe6b1dbdc696ab68c8bd88b6e1276d7a7d4220ca.tar.gz
emacs-fe6b1dbdc696ab68c8bd88b6e1276d7a7d4220ca.zip
(progress-reporter-do-update): When `min-value' is equal
to `max-value', set `percentage' to 0 and prevent division by zero.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/subr.el4
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d1a050343ec..f9cad483232 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12005-03-20 Juri Linkov <juri@jurta.org>
2
3 * subr.el (progress-reporter-do-update): When `min-value' is equal
4 to `max-value', set `percentage' to 0 and prevent division by zero.
5
12005-03-20 Michael Albinus <michael.albinus@gmx.de> 62005-03-20 Michael Albinus <michael.albinus@gmx.de>
2 7
3 Sync with Tramp 2.0.48. 8 Sync with Tramp 2.0.48.
diff --git a/lisp/subr.el b/lisp/subr.el
index b9e7786cfe4..4ff9be7e8b9 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2750,7 +2750,9 @@ change the displayed message."
2750 (min-value (aref parameters 1)) 2750 (min-value (aref parameters 1))
2751 (max-value (aref parameters 2)) 2751 (max-value (aref parameters 2))
2752 (one-percent (/ (- max-value min-value) 100.0)) 2752 (one-percent (/ (- max-value min-value) 100.0))
2753 (percentage (truncate (/ (- value min-value) one-percent))) 2753 (percentage (if (= max-value min-value)
2754 0
2755 (truncate (/ (- value min-value) one-percent))))
2754 (update-time (aref parameters 0)) 2756 (update-time (aref parameters 0))
2755 (current-time (float-time)) 2757 (current-time (float-time))
2756 (enough-time-passed 2758 (enough-time-passed