From ae4bfd52deecfccbbeb20ac852564b75a1bb83ff Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Feb 2019 00:50:19 -0800 Subject: =?UTF-8?q?Don=E2=80=99t=20assume=20CURRENT=5FTIME=5FLIST?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/progmodes/cc-cmds.el (c-progress-init) (c-progress-update): * lisp/progmodes/cperl-mode.el (cperl-time-fontification): * lisp/progmodes/vhdl-mode.el (vhdl-update-progress-info) (vhdl-fix-case-region-1): Don’t assume (current-time) returns a list. Fix unlikely bug if we’re called 65536 seconds apart. --- lisp/progmodes/cc-cmds.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/progmodes/cc-cmds.el') diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index c0a688195ca..efc6747de48 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -3609,7 +3609,7 @@ Otherwise reindent just the current line." (save-excursion (goto-char end) (point-marker)) - (nth 1 (current-time)) + (encode-time nil 'integer) context)) (message "Indenting region...")) )) @@ -3617,7 +3617,7 @@ Otherwise reindent just the current line." (defun c-progress-update () (if (not (and c-progress-info c-progress-interval)) nil - (let ((now (nth 1 (current-time))) + (let ((now (encode-time nil 'integer)) (start (aref c-progress-info 0)) (end (aref c-progress-info 1)) (lastsecs (aref c-progress-info 2))) -- cgit v1.2.1