comparison lisp/frame.el @ 8453:32880f6bd87a

(frame-delete-all): Copy the whole alist first.
author Richard M. Stallman <rms@gnu.org>
date Thu, 04 Aug 1994 23:31:12 +0000
parents af4e01d24892
children 340ebdb14a0e
comparison
equal deleted inserted replaced
8452:b9fe5aec7126 8453:32880f6bd87a
334 (setq frame-initial-frame nil))) 334 (setq frame-initial-frame nil)))
335 335
336 ;; Delete from ALIST all elements whose car is KEY. 336 ;; Delete from ALIST all elements whose car is KEY.
337 ;; Return the modified alist. 337 ;; Return the modified alist.
338 (defun frame-delete-all (key alist) 338 (defun frame-delete-all (key alist)
339 (setq alist (copy-sequence alist))
339 (let ((tail alist)) 340 (let ((tail alist))
340 (while tail 341 (while tail
341 (if (eq (car (car tail)) key) 342 (if (eq (car (car tail)) key)
342 (setq alist (delq (car tail) alist))) 343 (setq alist (delq (car tail) alist)))
343 (setq tail (cdr tail))) 344 (setq tail (cdr tail)))