# HG changeset patch # User Romain Francoise # Date 1222190800 0 # Node ID 5053145089c9685559a166b880a2403f8b44651e # Parent 7fafc74e823f771822891e1b12df386e5d1ef297 (with-output-to-string): Make sure that the temporary buffer gets killed. diff -r 7fafc74e823f -r 5053145089c9 lisp/ChangeLog --- a/lisp/ChangeLog Tue Sep 23 11:32:25 2008 +0000 +++ b/lisp/ChangeLog Tue Sep 23 17:26:40 2008 +0000 @@ -1,3 +1,8 @@ +2008-09-23 Romain Francoise + + * subr.el (with-output-to-string): Make sure that the temporary + buffer gets killed. + 2008-09-23 Markus Sauermann (tiny change) * emacs-lisp/emacslisp-mode.el (calculate-lisp-indent): Fix @@ -34,7 +39,7 @@ 2008-09-20 David De La Harpe Golden - * files.el (move-file-to-trash): Avoid recursive trashing if + * files.el (move-file-to-trash): Avoid recursive trashing if rename-file calls delete-file. 2008-09-20 Glenn Morris @@ -111,7 +116,7 @@ 2008-09-17 Jay Belanger - * calc/calc-units.el (calc-convert-temperature): Use default + * calc/calc-units.el (calc-convert-temperature): Use default units when appropriate. 2008-09-16 Markus Triska diff -r 7fafc74e823f -r 5053145089c9 lisp/subr.el --- a/lisp/subr.el Tue Sep 23 11:32:25 2008 +0000 +++ b/lisp/subr.el Tue Sep 23 17:26:40 2008 +0000 @@ -2586,12 +2586,13 @@ (declare (indent 0) (debug t)) `(let ((standard-output (get-buffer-create (generate-new-buffer-name " *string-output*")))) - (let ((standard-output standard-output)) - ,@body) - (with-current-buffer standard-output - (prog1 - (buffer-string) - (kill-buffer nil))))) + (unwind-protect + (progn + (let ((standard-output standard-output)) + ,@body) + (with-current-buffer standard-output + (buffer-string))) + (kill-buffer standard-output)))) (defmacro with-local-quit (&rest body) "Execute BODY, allowing quits to terminate BODY but not escape further.