]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/vhdl-mode.el
Merge from emacs--rel--22
[gnu-emacs] / lisp / progmodes / vhdl-mode.el
index c549d066b644c9f1d90bee6d953fe44f6361803b..0d909a4a3fff999f2c189272344d48cb71da3741 100644 (file)
@@ -19,7 +19,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -6982,10 +6982,13 @@ only-lines."
   (when (and vhdl-progress-info (not noninteractive)
             (< vhdl-progress-interval
                (- (nth 1 (current-time)) (aref vhdl-progress-info 2))))
-    (message (concat string "... (%2d%s)")
-            (/ (* 100 (- pos (aref vhdl-progress-info 0)))
-               (- (aref vhdl-progress-info 1)
-                  (aref vhdl-progress-info 0))) "%")
+    (let ((delta (- (aref vhdl-progress-info 1)
+                    (aref vhdl-progress-info 0))))
+      (if (= 0 delta)
+          (message (concat string "... (100%s)") "%")
+        (message (concat string "... (%2d%s)")
+                 (/ (* 100 (- pos (aref vhdl-progress-info 0)))
+                    delta) "%")))
     (aset vhdl-progress-info 2 (nth 1 (current-time)))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;