changeset 76805:baac37af5483

(ewoc--insert-new-node): Take additional arg DLL. Use it, passed in explicitly, instead of from the dynamic binding. (ewoc-create, ewoc-enter-before): Update to use new call sequence.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Fri, 30 Mar 2007 16:11:04 +0000
parents 2e059045b3c3
children 49f7bf45e3fa
files lisp/emacs-lisp/ewoc.el
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/ewoc.el	Fri Mar 30 15:33:01 2007 +0000
+++ b/lisp/emacs-lisp/ewoc.el	Fri Mar 30 16:11:04 2007 +0000
@@ -191,8 +191,9 @@
                     (not (eq dll node))))
         (setq node (ewoc--node-right node))))))
 
-(defun ewoc--insert-new-node (node data pretty-printer)
+(defun ewoc--insert-new-node (node data pretty-printer dll)
   "Insert before NODE a new node for DATA, displayed by PRETTY-PRINTER.
+Fourth arg DLL -- from `(ewoc--dll EWOC)' -- is for internal purposes.
 Call PRETTY-PRINTER with point at NODE's start, thus pushing back
 NODE and leaving the new node's start there.  Return the new node."
   (save-excursion
@@ -262,8 +263,8 @@
       (unless header (setq header ""))
       (unless footer (setq footer ""))
       (setf (ewoc--node-start-marker dll) (copy-marker pos)
-            foot (ewoc--insert-new-node  dll footer hf-pp)
-            head (ewoc--insert-new-node foot header hf-pp)
+            foot (ewoc--insert-new-node  dll footer hf-pp dll)
+            head (ewoc--insert-new-node foot header hf-pp dll)
             (ewoc--hf-pp new-ewoc) hf-pp
             (ewoc--footer new-ewoc) foot
             (ewoc--header new-ewoc) head))
@@ -301,7 +302,7 @@
   "Enter a new element DATA before NODE in EWOC.
 Return the new node."
   (ewoc--set-buffer-bind-dll ewoc
-    (ewoc--insert-new-node node data (ewoc--pretty-printer ewoc))))
+    (ewoc--insert-new-node node data (ewoc--pretty-printer ewoc) dll)))
 
 (defun ewoc-next (ewoc node)
   "Return the node in EWOC that follows NODE.