comparison lisp/subr.el @ 67917:15149da0b974

(cancel-change-group): Add listp around pending-undo-list.
author Juri Linkov <juri@jurta.org>
date Fri, 30 Dec 2005 06:00:17 +0000
parents 7c797468d04b
children d2b4af1c4fef c69d44922688 7beb78bc1f8e
comparison
equal deleted inserted replaced
67916:26c863f15f72 67917:15149da0b974
1682 (unless (eq last-command 'undo) (undo-start)) 1682 (unless (eq last-command 'undo) (undo-start))
1683 ;; Make sure there's no confusion. 1683 ;; Make sure there's no confusion.
1684 (when (and (consp elt) (not (eq elt (last pending-undo-list)))) 1684 (when (and (consp elt) (not (eq elt (last pending-undo-list))))
1685 (error "Undoing to some unrelated state")) 1685 (error "Undoing to some unrelated state"))
1686 ;; Undo it all. 1686 ;; Undo it all.
1687 (while pending-undo-list (undo-more 1)) 1687 (while (listp pending-undo-list) (undo-more 1))
1688 ;; Reset the modified cons cell ELT to its original content. 1688 ;; Reset the modified cons cell ELT to its original content.
1689 (when (consp elt) 1689 (when (consp elt)
1690 (setcar elt old-car) 1690 (setcar elt old-car)
1691 (setcdr elt old-cdr)) 1691 (setcdr elt old-cdr))
1692 ;; Revert the undo info to what it was when we grabbed the state. 1692 ;; Revert the undo info to what it was when we grabbed the state.