summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2007-07-23 21:49:42 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2007-07-23 21:49:42 +0000
commitae59e8884655055609aafcd9bf2d405936018802 (patch)
tree94386ffc397aa5a6197d71d9c379ee6f8a172333
parent6145f7fdfe318bc3f13aa03c083bfcd489bd9d83 (diff)
downloademacs-ae59e8884655055609aafcd9bf2d405936018802.tar.gz
(ses-cleanup): Prevent Emacs from spuriously checking if the
underlying file is uptodate.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/ses.el11
2 files changed, 13 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9ed3c322922..46624565600 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-23 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * ses.el (ses-cleanup): Prevent Emacs from spuriously checking if the
+ underlying file is uptodate.
+
2007-07-23 Richard Stallman <rms@gnu.org>
* progmodes/octave-inf.el (inferior-octave-prompt): Accept .exe.
diff --git a/lisp/ses.el b/lisp/ses.el
index 4f51c803de1..c729ca4b432 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -1470,17 +1470,22 @@ Narrows the buffer to show only the print area. Gives it `read-only' and
(overlay-put ses--curcell-overlay 'face 'underline))
(defun ses-cleanup ()
- "Cleanup when changing a buffer from SES mode to something else. Delete
-overlay, remove special text properties."
+ "Cleanup when changing a buffer from SES mode to something else.
+Delete overlays, remove special text properties."
(widen)
(let ((inhibit-read-only t)
+ ;; When reverting, hide the buffer name, otherwise Emacs will ask
+ ;; the user "the file is modified, do you really want to make
+ ;; modifications to this buffer", where the "modifications" refer to
+ ;; the irrelevant set-text-properties below.
+ (buffer-file-name nil)
(was-modified (buffer-modified-p)))
;;Delete read-only, keymap, and intangible properties
(set-text-properties (point-min) (point-max) nil)
;;Delete overlay
(mapc 'delete-overlay (overlays-in (point-min) (point-max)))
(unless was-modified
- (set-buffer-modified-p nil))))
+ (restore-buffer-modified-p nil))))
;;;###autoload
(defun ses-mode ()