comparison lisp/cus-edit.el @ 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 b107764e9a67
children 5d588ea856f6
comparison
equal deleted inserted replaced
51560:12371b18ce00 51561:bed114065e35
1221 (if (null buf) 1221 (if (null buf)
1222 (get-buffer-create name) 1222 (get-buffer-create name)
1223 (with-current-buffer buf 1223 (with-current-buffer buf
1224 (kill-all-local-variables) 1224 (kill-all-local-variables)
1225 (run-hooks 'kill-buffer-hook) 1225 (run-hooks 'kill-buffer-hook)
1226 (erase-buffer) 1226 ;; Delete overlays before erasing the buffer so the overlay hooks
1227 ;; don't get run spuriously when we erase the buffer.
1227 (let ((ols (overlay-lists))) 1228 (let ((ols (overlay-lists)))
1228 (dolist (ol (nconc (car ols) (cdr ols))) 1229 (dolist (ol (nconc (car ols) (cdr ols)))
1229 (delete-overlay ol))) 1230 (delete-overlay ol)))
1231 (erase-buffer)
1230 buf)))) 1232 buf))))
1231 1233
1232 ;;;###autoload 1234 ;;;###autoload
1233 (defun custom-buffer-create (options &optional name description) 1235 (defun custom-buffer-create (options &optional name description)
1234 "Create a buffer containing OPTIONS. 1236 "Create a buffer containing OPTIONS.