aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-12-07 19:45:45 -0800
committerGlenn Morris2010-12-07 19:45:45 -0800
commitec1b9b17fa69a4ac051f64e21c85660d127c23a5 (patch)
tree1d0e75cfef0af7ac32a42c3c2d682cc0ee7980f0
parent33cf0fb2261201d66a7bf122d30718bdfbd7d38e (diff)
downloademacs-ec1b9b17fa69a4ac051f64e21c85660d127c23a5.tar.gz
emacs-ec1b9b17fa69a4ac051f64e21c85660d127c23a5.zip
Make verify-visited-file-modtime default to the current buffer.
* src/fileio.c (Fverify_visited_file_modtime): Default to current buffer. * doc/lispref/buffers.texi (Modification Time): verify-visited-file-modtime now defaults to the current buffer.
-rw-r--r--doc/lispref/ChangeLog8
-rw-r--r--doc/lispref/buffers.texi18
-rw-r--r--src/ChangeLog4
-rw-r--r--src/fileio.c14
4 files changed, 27 insertions, 17 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index c6d851f55ec..36d85bc98ba 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,7 +1,11 @@
12010-12-08 Glenn Morris <rgm@gnu.org>
2
3 * buffers.texi (Modification Time):
4 verify-visited-file-modtime now defaults to the current buffer.
5
12010-11-27 Chong Yidong <cyd@stupidchicken.com> 62010-11-27 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * nonascii.texi (Converting Representations): Document 8 * nonascii.texi (Converting Representations): Document byte-to-string.
4 byte-to-string.
5 9
6 * strings.texi (Creating Strings): Don't mention semi-obsolete 10 * strings.texi (Creating Strings): Don't mention semi-obsolete
7 function char-to-string. 11 function char-to-string.
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 2a7a603e733..8811178fe92 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -1,7 +1,8 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, 2002, 3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, 2002,
4@c 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 4@c 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 6@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/buffers 7@setfilename ../../info/buffers
7@node Buffers, Windows, Backups and Auto-Saving, Top 8@node Buffers, Windows, Backups and Auto-Saving, Top
@@ -594,12 +595,12 @@ therefore checks the file's modification time using the functions
594described below before saving the file. (@xref{File Attributes}, 595described below before saving the file. (@xref{File Attributes},
595for how to examine a file's modification time.) 596for how to examine a file's modification time.)
596 597
597@defun verify-visited-file-modtime buffer 598@defun verify-visited-file-modtime &optional buffer
598This function compares what @var{buffer} has recorded for the 599This function compares what @var{buffer} (by default, the
599modification time of its visited file against the actual modification 600current-buffer) has recorded for the modification time of its visited
600time of the file as recorded by the operating system. The two should be 601file against the actual modification time of the file as recorded by the
601the same unless some other process has written the file since Emacs 602operating system. The two should be the same unless some other process
602visited or saved it. 603has written the file since Emacs visited or saved it.
603 604
604The function returns @code{t} if the last actual modification time and 605The function returns @code{t} if the last actual modification time and
605Emacs's recorded modification time are the same, @code{nil} otherwise. 606Emacs's recorded modification time are the same, @code{nil} otherwise.
@@ -1223,6 +1224,3 @@ This function returns the current gap position in the current buffer.
1223This function returns the current gap size of the current buffer. 1224This function returns the current gap size of the current buffer.
1224@end defun 1225@end defun
1225 1226
1226@ignore
1227 arch-tag: 2e53cfab-5691-41f6-b5a8-9c6a3462399c
1228@end ignore
diff --git a/src/ChangeLog b/src/ChangeLog
index 47dd5c650c3..eeba4192e25 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12010-12-08 Glenn Morris <rgm@gnu.org>
2
3 * fileio.c (Fverify_visited_file_modtime): Default to current buffer.
4
12010-12-06 Lars Magne Ingebrigtsen <larsi@gnus.org> 52010-12-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 6
3 * xml.c (parse_region): Ignore blank HTML nodes. 7 * xml.c (parse_region): Ignore blank HTML nodes.
diff --git a/src/fileio.c b/src/fileio.c
index 36b6cc3ca8b..886e5ebc411 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5044,9 +5044,10 @@ e_write (int desc, Lisp_Object string, int start, int end, struct coding_system
5044} 5044}
5045 5045
5046DEFUN ("verify-visited-file-modtime", Fverify_visited_file_modtime, 5046DEFUN ("verify-visited-file-modtime", Fverify_visited_file_modtime,
5047 Sverify_visited_file_modtime, 1, 1, 0, 5047 Sverify_visited_file_modtime, 0, 1, 0,
5048 doc: /* Return t if last mod time of BUF's visited file matches what BUF records. 5048 doc: /* Return t if last mod time of BUF's visited file matches what BUF records.
5049This means that the file has not been changed since it was visited or saved. 5049This means that the file has not been changed since it was visited or saved.
5050If BUF is omitted or nil, it defaults to the current buffer.
5050See Info node `(elisp)Modification Time' for more details. */) 5051See Info node `(elisp)Modification Time' for more details. */)
5051 (Lisp_Object buf) 5052 (Lisp_Object buf)
5052{ 5053{
@@ -5055,8 +5056,13 @@ See Info node `(elisp)Modification Time' for more details. */)
5055 Lisp_Object handler; 5056 Lisp_Object handler;
5056 Lisp_Object filename; 5057 Lisp_Object filename;
5057 5058
5058 CHECK_BUFFER (buf); 5059 if (NILP (buf))
5059 b = XBUFFER (buf); 5060 b = current_buffer;
5061 else
5062 {
5063 CHECK_BUFFER (buf);
5064 b = XBUFFER (buf);
5065 }
5060 5066
5061 if (!STRINGP (b->filename)) return Qt; 5067 if (!STRINGP (b->filename)) return Qt;
5062 if (b->modtime == 0) return Qt; 5068 if (b->modtime == 0) return Qt;
@@ -5863,5 +5869,3 @@ This includes interactive calls to `delete-file' and
5863#endif 5869#endif
5864} 5870}
5865 5871
5866/* arch-tag: 64ba3fd7-f844-4fb2-ba4b-427eb928786c
5867 (do not change this comment) */