X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/9ee365d565205366d61d9b50dd2a15ef903be983..bdaf8a62d53cf8d5a0dc4f0dc530ecd6fc1f44fe:/lisp/progmodes/vhdl-mode.el diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index c549d066b6..0d909a4a3f 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -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))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;