aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2013-07-09 23:26:23 -0700
committerPaul Eggert <[email protected]>2013-07-09 23:26:23 -0700
commit954b166e9037de5fdd43b4fbe7b8c73a36ac402e (patch)
tree4a1aa065be1ec87b53fdaff13f1129863ba2ebb5 /etc
parent56973319b58a66e97ae45e050f9f943ff8f1439b (diff)
Timestamp fixes for undo.
* doc/lispref/text.texi (Undo): Document (t . 0) and (t . -1) in buffer-undo-list. * etc/NEWS: Changes to visited-file-modtime, set-visited-file-modtime. * lisp/files.el (clear-visited-file-modtime): Move here from fileio.c. * src/atimer.c (schedule_atimer): * src/fileio.c (Ffile_newer_than_file_p): Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT. * src/buffer.c (buffer-undo-list): Document (t . 0) and (t . -1). * src/fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el. (syms_of_fileio): Remove Sclear_visited_file_name. (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited file doesn't exist; this avoids an ambiguity with negative timestamps. (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg. * src/systime.h (make_emacs_time, invalid_emacs_time): Don't assume struct timespec layout; POSIX doesn't guarantee it. (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove. * src/undo.c (record_first_change): Push (visited-file-modtime) onto undo list rather than reimplementing it by hand, incorrectly. Fixes: debbugs:14824
Diffstat (limited to 'etc')
-rw-r--r--etc/ChangeLog5
-rw-r--r--etc/NEWS6
2 files changed, 11 insertions, 0 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 843f176a6a..9ed1b6e0df 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-10 Paul Eggert <[email protected]>
+
+ Timestamp fixes for undo (Bug#14824).
+ * NEWS: Changes to visited-file-modtime, set-visited-file-modtime.
+
2013-07-08 Jan Djärv <[email protected]>
* NEWS: NS can be build with ImageMagick.
diff --git a/etc/NEWS b/etc/NEWS
index 1c81c8329a..6dd89fcd4d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -537,6 +537,9 @@ alist of extended attributes as returned by the new function
`file-extended-attributes'. The attributes can be applied to another
file using `set-file-extended-attributes'.
+** `visited-file-modtime' now returns -1 for nonexistent files.
+Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous
+in the presence of files with negative time stamps.
* Lisp Changes in Emacs 24.4
@@ -613,6 +616,9 @@ Emacs uses `image-default-frame-delay'.
*** New functions `image-current-frame' and `image-show-frame' for getting
and setting the current frame of a multi-frame image.
+** The function `set-visited-file-modtime' now accepts a 0 or -1 argument
+with the same interpretation as the returned value of `visited-file-modtime'.
+
** time-to-seconds is not obsolete any more.
** New function special-form-p.
** Docstrings can be made dynamic by adding a `dynamic-docstring-function'