Simplify use of current-time and friends.
commit6d0261be3f2c562392bd7035d7b54b678b561494
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 29 Oct 2014 01:42:51 +0000 (28 18:42 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 29 Oct 2014 01:42:51 +0000 (28 18:42 -0700)
tree16baee271c5b7fb3a2ce93f1f8607616aed7b773
parentbe7b8ac9cf3378aacb50f7b00c961769b7b15b87
Simplify use of current-time and friends.

* doc/misc/org.texi (Dynamic blocks):
* lisp/allout-widgets.el (allout-widgets-hook-error-handler):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/icalendar.el (icalendar--convert-float-to-ical):
* lisp/calendar/timeclock.el (timeclock-in, timeclock-when-to-leave)
(timeclock-last-period, timeclock-day-base):
* lisp/eshell/em-ls.el (eshell-ls-file):
* lisp/eshell/esh-util.el (eshell-parse-ange-ls):
* lisp/generic-x.el (named-database-print-serial):
* lisp/net/newst-backend.el (newsticker--get-news-by-url-callback)
(newsticker-get-news, newsticker--sentinel-work)
(newsticker--image-get, newsticker--image-sentinel):
* lisp/net/tramp-sh.el (tramp-get-remote-touch):
* lisp/progmodes/opascal.el (opascal-debug-log):
* lisp/textmodes/remember.el (remember-mail-date)
(remember-store-in-files):
* lisp/vc/vc-annotate.el (vc-annotate-display-autoscale)
(vc-default-annotate-current-time):
* lisp/vc/vc-bzr.el (vc-bzr-shelve-snapshot):
* lisp/vc/vc-cvs.el (vc-cvs-annotate-current-time):
* lisp/vc/vc-rcs.el (vc-rcs-annotate-current-time):
* lisp/url/url-util.el (url-get-normalized-date):
* lisp/erc/erc-backend.el (TOPIC):
* lisp/gnus/gnus-delay.el (gnus-delay-article):
* lisp/gnus/gnus-sum.el (gnus-summary-read-document):
* lisp/gnus/gnus-util.el (gnus-seconds-today, gnus-seconds-month):
* lisp/gnus/message.el (message-make-expires-date):
* lisp/org/org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling):
* lisp/org/org-clock.el (org-resolve-clocks, org-clock-get-sum-start)
(org-clock-special-range):
* lisp/org/org-timer.el (org-timer-seconds):
* lisp/org/org.el (org-read-date-analyze, org-get-cursor-date):
* lisp/org/ox-html.el (org-html-format-spec):
* lisp/org/ox-icalendar.el (org-icalendar--vtodo):
Omit unnecessary call to current-time.
* lisp/calendar/time-date.el (time-to-seconds) [!float-time]:
* lisp/calendar/timeclock.el (timeclock-time-to-date):
* lisp/vc/vc-annotate.el (vc-annotate-convert-time):
Use current time if arg is nil, to be compatible with float-time.
(time-date--day-in-year): New function, with most of the guts of
the old time-to-day-in-year.
(time-to-day-in-year): Use it.
(time-to-days): Use it, to avoid decoding the same time stamp twice.
* lisp/calendar/timeclock.el (timeclock-update-mode-line):
* lisp/cedet/srecode/args.el (srecode-semantic-handle-:time):
* lisp/gnus/gnus-util.el (gnus-seconds-year):
* lisp/org/org.el (org-get-cursor-date):
Don't call current-time twice to get the current time stamp,
as this can lead to inconsistent results.
* lisp/completion.el (cmpl-hours-since-origin):
* lisp/erc/erc.el (erc-emacs-time-to-erc-time):
* lisp/ido.el (ido-time-stamp):
* lisp/vc/vc-annotate.el (vc-annotate-convert-time):
Simplify by using float-time.
* lisp/completion.el (save-completions-to-file):
* lisp/url/url-cache.el (url-cache-prune-cache):
Rename local var to avoid confusion.
* lisp/gnus/gnus-util.el (gnus-float-time):
* lisp/net/rcirc.el (rcirc-float-time):
* lisp/org/org-compat.el (org-float-time):
Simplify to an alias because time-to-seconds now behaves like float-time
with respect to nil arg.
* lisp/subr.el (progress-reporter-do-update):
Don't call float-time unless needed.
* lisp/erc/erc.el (erc-current-time): Simplify by using erc-emacs-time-to-erc-time.
* lisp/org/org-clock.el (org-clock-get-table-data): Omit unnecessary, lossy
conversion from floating point to Emacs time and back.
(org-resolve-clocks): Prefer two-argument floor.
44 files changed:
doc/misc/ChangeLog
doc/misc/org.texi
lisp/ChangeLog
lisp/allout-widgets.el
lisp/calendar/appt.el
lisp/calendar/icalendar.el
lisp/calendar/time-date.el
lisp/calendar/timeclock.el
lisp/cedet/ChangeLog
lisp/cedet/srecode/args.el
lisp/completion.el
lisp/erc/ChangeLog
lisp/erc/erc-backend.el
lisp/erc/erc.el
lisp/eshell/em-ls.el
lisp/eshell/esh-util.el
lisp/generic-x.el
lisp/gnus/ChangeLog
lisp/gnus/gnus-delay.el
lisp/gnus/gnus-sum.el
lisp/gnus/gnus-util.el
lisp/gnus/message.el
lisp/ido.el
lisp/net/newst-backend.el
lisp/net/rcirc.el
lisp/net/tramp-sh.el
lisp/org/ChangeLog
lisp/org/org-archive.el
lisp/org/org-clock.el
lisp/org/org-compat.el
lisp/org/org-timer.el
lisp/org/org.el
lisp/org/ox-html.el
lisp/org/ox-icalendar.el
lisp/progmodes/opascal.el
lisp/subr.el
lisp/textmodes/remember.el
lisp/url/ChangeLog
lisp/url/url-cache.el
lisp/url/url-util.el
lisp/vc/vc-annotate.el
lisp/vc/vc-bzr.el
lisp/vc/vc-cvs.el
lisp/vc/vc-rcs.el