summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-cmds.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-02-13 00:50:19 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2019-02-13 00:51:15 -0800
commitae4bfd52deecfccbbeb20ac852564b75a1bb83ff (patch)
tree168f67bb3fb5c684ec3096018cff019bf371642d /lisp/progmodes/cc-cmds.el
parent8e0d35802cda844ccb6ddf417672b5a5845f4874 (diff)
downloademacs-ae4bfd52deecfccbbeb20ac852564b75a1bb83ff.tar.gz
Don’t assume CURRENT_TIME_LIST
* 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.
Diffstat (limited to 'lisp/progmodes/cc-cmds.el')
-rw-r--r--lisp/progmodes/cc-cmds.el4
1 files changed, 2 insertions, 2 deletions
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)))