From e97fd4fb02ca707a3eb0657d581862349e53067e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 26 Dec 2007 19:05:28 +0000 Subject: [PATCH] (save-buffer-state): Make sure the state of the buffer is always restored. --- lisp/ChangeLog | 5 +++++ lisp/font-lock.el | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 392eaa6d609..e6a14fcb813 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-12-26 Andreas Schwab + + * font-lock.el (save-buffer-state): Make sure the state of the + buffer is always restored. + 2007-12-26 Jay Belanger * calc/calc.el (calc-lang-allow-percentsigns): New variable. diff --git a/lisp/font-lock.el b/lisp/font-lock.el index dc350ce146b..76f3da98bec 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -616,10 +616,11 @@ Major/minor modes can set this variable if they know which option applies.") deactivate-mark buffer-file-name buffer-file-truename)) - (progn - ,@body) - (unless ,modified - (restore-buffer-modified-p nil))))) + (unwind-protect + (progn + ,@body) + (unless ,modified + (restore-buffer-modified-p nil)))))) ;; ;; Shut up the byte compiler. (defvar font-lock-face-attributes)) ; Obsolete but respected if set. -- 2.39.2