summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-07-12 18:44:13 -0600
committerTom Tromey <tromey@redhat.com>2013-07-12 18:44:13 -0600
commitb34a529f177a6ea32da5cb1254f91bf9d71838db (patch)
tree477131abc15d3107b30b635223d87a22550b480b /lisp/files.el
parente6f63071a3f7721f55220514b6d9a8ee8c1232d8 (diff)
parent5e301d7651c0691bb2bc7f3fbe711fdbe26ac471 (diff)
downloademacs-b34a529f177a6ea32da5cb1254f91bf9d71838db.tar.gz
Merge from trunk
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 9b56dfa9693..ff4ccec2279 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -316,6 +316,7 @@ A value of nil means don't add newlines.
Certain major modes set this locally to the value obtained
from `mode-require-final-newline'."
+ :safe #'symbolp
:type '(choice (const :tag "When visiting" visit)
(const :tag "When saving" t)
(const :tag "When visiting or saving" visit-save)
@@ -4916,6 +4917,11 @@ change the additional actions you can take on files."
(length autosaved-buffers)
(mapconcat 'identity autosaved-buffers ", "))))))))
+(defun clear-visited-file-modtime ()
+ "Clear out records of last mod time of visited file.
+Next attempt to save will certainly not complain of a discrepancy."
+ (set-visited-file-modtime 0))
+
(defun not-modified (&optional arg)
"Mark current buffer as unmodified, not needing to be saved.
With prefix ARG, mark buffer as modified, so \\[save-buffer] will save.