aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2007-08-13 11:12:50 +0000
committerJuanma Barranquero2007-08-13 11:12:50 +0000
commitb0cf7916dcc9887d01ab0e7e698a5e8fc5a80016 (patch)
treedfc1e62cd5e33685dc61e64821693e7148fc234d
parentf020b5c9c57cbefa65a379309662eabef14eec8b (diff)
downloademacs-b0cf7916dcc9887d01ab0e7e698a5e8fc5a80016.tar.gz
emacs-b0cf7916dcc9887d01ab0e7e698a5e8fc5a80016.zip
(vhdl-update-progress-info): Avoid divide by zero error.
-rw-r--r--lisp/progmodes/vhdl-mode.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index a1bd32a313d..0d909a4a3ff 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -6982,10 +6982,13 @@ only-lines."
6982 (when (and vhdl-progress-info (not noninteractive) 6982 (when (and vhdl-progress-info (not noninteractive)
6983 (< vhdl-progress-interval 6983 (< vhdl-progress-interval
6984 (- (nth 1 (current-time)) (aref vhdl-progress-info 2)))) 6984 (- (nth 1 (current-time)) (aref vhdl-progress-info 2))))
6985 (message (concat string "... (%2d%s)") 6985 (let ((delta (- (aref vhdl-progress-info 1)
6986 (/ (* 100 (- pos (aref vhdl-progress-info 0))) 6986 (aref vhdl-progress-info 0))))
6987 (- (aref vhdl-progress-info 1) 6987 (if (= 0 delta)
6988 (aref vhdl-progress-info 0))) "%") 6988 (message (concat string "... (100%s)") "%")
6989 (message (concat string "... (%2d%s)")
6990 (/ (* 100 (- pos (aref vhdl-progress-info 0)))
6991 delta) "%")))
6989 (aset vhdl-progress-info 2 (nth 1 (current-time))))) 6992 (aset vhdl-progress-info 2 (nth 1 (current-time)))))
6990 6993
6991;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 6994;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;