]> git.eshelyaron.com Git - emacs.git/commitdiff
(hilit-find-file-hook): Preserve buffer modified state.
authorRichard M. Stallman <rms@gnu.org>
Thu, 4 Aug 1994 20:15:36 +0000 (20:15 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 4 Aug 1994 20:15:36 +0000 (20:15 +0000)
lisp/hilit19.el

index d2b7c5bbd2a2b505789fda8faace54141580e076..961ccea638018c690d205db3129a9ce8ed24437b 100644 (file)
@@ -815,9 +815,11 @@ non-nil."
         (if (> buffer-saved-size (car hilit-auto-rehighlight-fallback))
             (setq hilit-auto-rehighlight
                   (cdr hilit-auto-rehighlight-fallback)))
-        (if (> buffer-saved-size hilit-auto-highlight-maxout) nil
-          (hilit-rehighlight-buffer)
-          (set-buffer-modified-p nil)))))
+        (if (> buffer-saved-size hilit-auto-highlight-maxout)
+            nil
+          (let ((bm (buffer-modified-p)))
+            (hilit-rehighlight-buffer)
+            (set-buffer-modified-p bm))))))
 
 (defun hilit-repaint-command (arg)
   "Rehighlights according to the value of hilit-auto-rehighlight, or the