diff lisp/files.el @ 2030:488b2f76d852

[xemacs-hg @ 2004-04-19 08:54:47 by stephent] assorted improvements in ./lisp/ <87llkswdr6.fsf@tleepslib.sk.tsukuba.ac.jp> <87pta4we6g.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Mon, 19 Apr 2004 08:54:50 +0000
parents d91e7fd568fd
children 19834ffbffc4
line wrap: on
line diff
--- a/lisp/files.el	Mon Apr 19 08:16:33 2004 +0000
+++ b/lisp/files.el	Mon Apr 19 08:54:50 2004 +0000
@@ -3480,10 +3480,20 @@
 		    ;; The resultant buffer is identical, alter
 		    ;; modtime, update mods and exit
 		    (set-visited-file-modtime)
-		    (after-find-file nil nil t t t))
+		    (after-find-file nil nil t t t)
+		    ;; We preserved modes above so fixup the local
+		    ;; variables manually
+		    (condition-case err
+			(hack-local-variables)
+		      (error (lwarn 'local-variables 'warning
+			       "File local-variables error: %s"
+			       (error-message-string err)))))
 		   (t t))
 	     t)))))
 
+;; #### wouldn't something like `revert-buffer-compare-with-file' be a
+;; better name?
+;; #### why is the argument optional?
 (defun revert-buffer-internal (&optional file-name)
   "Read contents of FILE-NAME into a buffer, and compare to current buffer.
 Return nil if identical, and the new buffer if different."