summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-10-03 09:10:01 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-10-06 23:31:04 -0700
commit3cc452327eff056f17637566aaf05a877e61d69a (patch)
treee702e883dab66b2a63cf1b728c3bd7ca0faabd70 /doc
parent93fe420942c08111a6048af7c4d7807c61d80a09 (diff)
downloademacs-3cc452327eff056f17637566aaf05a877e61d69a.tar.gz
emacs-3cc452327eff056f17637566aaf05a877e61d69a.tar.bz2
emacs-3cc452327eff056f17637566aaf05a877e61d69a.zip
Improvements on (TICKS . HZ)
This patch is in response to Eli's review (Bug#32902#10). * src/systime.c: Doc strings of affected functions now refer to format-time-string instead of to Lisp manual, and format-time-string's doc string covers time values. * test/src/systime-tests.el (format-time-string-with-zone): Check decode-time too. (decode-then-encode-time, time-arith-tests): New tests.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/buffers.texi2
-rw-r--r--doc/lispref/os.texi14
2 files changed, 8 insertions, 8 deletions
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 8789a8d56f6..b2a4b0eab1a 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -654,7 +654,7 @@ If the buffer has no recorded last modification time, this function
returns zero. This case occurs, for instance, if the buffer is not
visiting a file or if the time has been explicitly cleared by
@code{clear-visited-file-modtime}. Note, however, that
-@code{visited-file-modtime} returns a list for some non-file buffers
+@code{visited-file-modtime} returns a timestamp for some non-file buffers
too. For instance, in a Dired buffer listing a directory, it returns
the last modification time of that directory, as recorded by Dired.
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index ea6915350e8..64c327c3809 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1457,14 +1457,14 @@ seconds east of Greenwich.
@var{dow} and @var{utcoff}.
@end defun
-@defun encode-time time &optional form
+@defun encode-time &optional time form &rest obsolescent-arguments
This function converts @var{time} to a Lisp timestamp.
It can act as the inverse of @code{decode-time}.
-The first argument can be a Lisp time value such as @code{nil} for the
-current time, a number of seconds, a pair @code{(@var{ticks}
-. @var{hz})}, or a list @code{(@var{high} @var{low} @var{micro}
-@var{pico})} (@pxref{Time of Day}). It can also be a list
+The first argument can be a time value such as a number of seconds, a
+pair @code{(@var{ticks} . @var{hz})}, a list @code{(@var{high}
+@var{low} @var{micro} @var{pico})}, or @code{nil} (the default) for
+the current time (@pxref{Time of Day}). It can also be a list
@code{(@var{second} @var{minute} @var{hour} @var{day} @var{month}
@var{year} @var{ignored} @var{dst} @var{zone})} that specifies a
decoded time in the style of @code{decode-time}, so that
@@ -1494,10 +1494,10 @@ or more arguments. The first six arguments @var{second},
specify most of the components of a decoded time. If there are more
than six arguments the @emph{last} argument is used as @var{zone} and
any other extra arguments are ignored, so that @code{(apply
-'encode-time (decode-time ...))} works; otherwise @var{zone} defaults
+#\\='encode-time (decode-time ...))} works; otherwise @var{zone} defaults
to the current time zone rule (@pxref{Time Zone Rules}). The decoded
time's @var{dst} component is treated as if it was @minus{}1, and
-@var{form} so it takes its default value.
+@var{form} takes its default value.
Year numbers less than 100 are not treated specially. If you want them
to stand for years above 1900, or years above 2000, you must alter them