[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/ewoc.el

From: Thien-Thi Nguyen
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/ewoc.el
Date: Sat, 27 May 2006 09:36:11 +0000

Index: emacs/lisp/emacs-lisp/ewoc.el
diff -u emacs/lisp/emacs-lisp/ewoc.el:1.31 emacs/lisp/emacs-lisp/ewoc.el:1.32
--- emacs/lisp/emacs-lisp/ewoc.el:1.31  Sat May 27 08:54:37 2006
+++ emacs/lisp/emacs-lisp/ewoc.el       Sat May 27 09:36:11 2006
@@ -385,12 +385,12 @@
 (defun ewoc-delete (ewoc &rest nodes)
   "Delete NODES from EWOC."
   (ewoc--set-buffer-bind-dll-let* ewoc
-      ((L nil) (R nil))
+      ((L nil) (R nil) (last (ewoc--last-node ewoc)))
     (dolist (node nodes)
       ;; If we are about to delete the node pointed at by last-node,
       ;; set last-node to nil.
-      (if (eq (ewoc--last-node ewoc) node)
-          (setf (ewoc--last-node ewoc) nil))
+      (when (eq last node)
+        (setf last nil (ewoc--last-node ewoc) nil))
       (delete-region (ewoc--node-start-marker node)
                      (ewoc--node-start-marker (ewoc--node-next node)))
       (set-marker (ewoc--node-start-marker node) nil)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]