# HG changeset patch # User Stefan Monnier # Date 1185227382 0 # Node ID ece6179ee893d1c666b4bfc384e94e6388578f9d # Parent 9072f82b7b8346d89680947319f6be2993523089 (ses-cleanup): Prevent Emacs from spuriously checking if the underlying file is uptodate. diff -r 9072f82b7b83 -r ece6179ee893 lisp/ChangeLog --- a/lisp/ChangeLog Mon Jul 23 17:55:00 2007 +0000 +++ b/lisp/ChangeLog Mon Jul 23 21:49:42 2007 +0000 @@ -1,3 +1,8 @@ +2007-07-23 Stefan Monnier + + * ses.el (ses-cleanup): Prevent Emacs from spuriously checking if the + underlying file is uptodate. + 2007-07-23 Richard Stallman * progmodes/octave-inf.el (inferior-octave-prompt): Accept .exe. diff -r 9072f82b7b83 -r ece6179ee893 lisp/ses.el --- a/lisp/ses.el Mon Jul 23 17:55:00 2007 +0000 +++ b/lisp/ses.el Mon Jul 23 21:49:42 2007 +0000 @@ -1470,17 +1470,22 @@ (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 ()