aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2013-07-09 23:26:23 -0700
committerPaul Eggert2013-07-09 23:26:23 -0700
commit954b166e9037de5fdd43b4fbe7b8c73a36ac402e (patch)
tree4a1aa065be1ec87b53fdaff13f1129863ba2ebb5 /doc
parent56973319b58a66e97ae45e050f9f943ff8f1439b (diff)
downloademacs-954b166e9037de5fdd43b4fbe7b8c73a36ac402e.tar.gz
emacs-954b166e9037de5fdd43b4fbe7b8c73a36ac402e.zip
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 'doc')
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/text.texi12
2 files changed, 13 insertions, 4 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index e4bc6eb5bcc..f8b7406c427 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12013-07-10 Paul Eggert <eggert@cs.ucla.edu>
2
3 Timestamp fixes for undo (Bug#14824).
4 * text.texi (Undo): Document (t . 0) and (t . -1) in buffer-undo-list.
5
12013-07-06 Eli Zaretskii <eliz@gnu.org> 62013-07-06 Eli Zaretskii <eliz@gnu.org>
2 7
3 * nonascii.texi (Text Representations): Document that 8 * nonascii.texi (Text Representations): Document that
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index c10458b39ae..7cace70ad07 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -1250,14 +1250,18 @@ reinsert it is @code{(abs @var{position})}. If @var{position} is
1250positive, point was at the beginning of the deleted text, otherwise it 1250positive, point was at the beginning of the deleted text, otherwise it
1251was at the end. 1251was at the end.
1252 1252
1253@item (t @var{sec-high} @var{sec-low} @var{microsec} @var{picosec}) 1253@item (t . @var{time-flag})
1254This kind of element indicates that an unmodified buffer became 1254This kind of element indicates that an unmodified buffer became
1255modified. The list @code{(@var{sec-high} @var{sec-low} @var{microsec} 1255modified. A @var{time-flag} of the form
1256@code{(@var{sec-high} @var{sec-low} @var{microsec}
1256@var{picosec})} represents the visited file's modification time as of 1257@var{picosec})} represents the visited file's modification time as of
1257when it was previously visited or saved, using the same format as 1258when it was previously visited or saved, using the same format as
1258@code{current-time}; see @ref{Time of Day}. @code{primitive-undo} uses those 1259@code{current-time}; see @ref{Time of Day}.
1260A @var{time-flag} of 0 means the buffer does not correspond to any file;
1261@minus{}1 means the visited file previously did not exist.
1262@code{primitive-undo} uses these
1259values to determine whether to mark the buffer as unmodified once again; 1263values to determine whether to mark the buffer as unmodified once again;
1260it does so only if the file's modification time matches those numbers. 1264it does so only if the file's status matches that of @var{time-flag}.
1261 1265
1262@item (nil @var{property} @var{value} @var{beg} . @var{end}) 1266@item (nil @var{property} @var{value} @var{beg} . @var{end})
1263This kind of element records a change in a text property. 1267This kind of element records a change in a text property.