summaryrefslogtreecommitdiff
path: root/lisp/hilit19.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-08-04 20:15:36 +0000
committerRichard M. Stallman <rms@gnu.org>1994-08-04 20:15:36 +0000
commit4559b38c1ae264e04a9b494e91cb49eb57d8ebd7 (patch)
treeeaf33636757378a20e436885e549b6d44f47425b /lisp/hilit19.el
parent780c8875f3ac9418eeffd2efc6f97fef45cbc138 (diff)
downloademacs-4559b38c1ae264e04a9b494e91cb49eb57d8ebd7.tar.gz
(hilit-find-file-hook): Preserve buffer modified state.
Diffstat (limited to 'lisp/hilit19.el')
-rw-r--r--lisp/hilit19.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/hilit19.el b/lisp/hilit19.el
index d2b7c5bbd2a..961ccea6380 100644
--- a/lisp/hilit19.el
+++ b/lisp/hilit19.el
@@ -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