Mercurial > emacs
changeset 51561:bed114065e35
(custom-get-fresh-buffer): Kill overlays before erasing the buffer.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 14 Jun 2003 19:04:20 +0000 |
parents | 12371b18ce00 |
children | 65f7a99a6241 |
files | lisp/cus-edit.el |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/cus-edit.el Sat Jun 14 11:26:08 2003 +0000 +++ b/lisp/cus-edit.el Sat Jun 14 19:04:20 2003 +0000 @@ -1223,10 +1223,12 @@ (with-current-buffer buf (kill-all-local-variables) (run-hooks 'kill-buffer-hook) - (erase-buffer) + ;; Delete overlays before erasing the buffer so the overlay hooks + ;; don't get run spuriously when we erase the buffer. (let ((ols (overlay-lists))) (dolist (ol (nconc (car ols) (cdr ols))) (delete-overlay ol))) + (erase-buffer) buf)))) ;;;###autoload