aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2006-05-29 03:47:56 +0000
committerStefan Monnier2006-05-29 03:47:56 +0000
commit7ece7aba2b5679b9909bf5e1969ea7c6a2ea852f (patch)
tree44f8ae2f59e349afd3f79675f9e1222cc20d112c
parentb8909e88823fb4502e548f4462f015234fad62bb (diff)
downloademacs-7ece7aba2b5679b9909bf5e1969ea7c6a2ea852f.tar.gz
emacs-7ece7aba2b5679b9909bf5e1969ea7c6a2ea852f.zip
(ewoc--insert-new-node): Use ewoc--refresh-node.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/emacs-lisp/ewoc.el25
2 files changed, 12 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6dd176768be..496bc1f34e2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12006-05-28 Stefan Monnier <monnier@iro.umontreal.ca> 12006-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * emacs-lisp/ewoc.el (ewoc--insert-new-node): Use ewoc--refresh-node.
4
3 * emacs-lisp/autoload.el (no-update-autoloads): Declare. 5 * emacs-lisp/autoload.el (no-update-autoloads): Declare.
4 (generate-file-autoloads): Obey it. Return whether autoloads were 6 (generate-file-autoloads): Obey it. Return whether autoloads were
5 added at point or not. 7 added at point or not.
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el
index c35d155b343..c9e2b9f27f4 100644
--- a/lisp/emacs-lisp/ewoc.el
+++ b/lisp/emacs-lisp/ewoc.el
@@ -99,7 +99,7 @@
99 99
100;;; Code: 100;;; Code:
101 101
102(eval-when-compile (require 'cl)) ;because of CL compiler macros 102(eval-when-compile (require 'cl))
103 103
104;; The doubly linked list is implemented as a circular list 104;; The doubly linked list is implemented as a circular list
105;; with a dummy node first and last. The dummy node is used as 105;; with a dummy node first and last. The dummy node is used as
@@ -197,18 +197,13 @@ BUT if it is the header or the footer in EWOC return nil instead."
197Call PRETTY-PRINTER with point at NODE's start, thus pushing back 197Call PRETTY-PRINTER with point at NODE's start, thus pushing back
198NODE and leaving the new node's start there. Return the new node." 198NODE and leaving the new node's start there. Return the new node."
199 (save-excursion 199 (save-excursion
200 (let* ((inhibit-read-only t) 200 (let ((elemnode (ewoc--node-create
201 (m (copy-marker (ewoc--node-start-marker node))) 201 (copy-marker (ewoc--node-start-marker node)) data)))
202 (pos (marker-position m)) 202 (setf (ewoc--node-left elemnode) (ewoc--node-left node)
203 (elemnode (ewoc--node-create m data)))
204 (goto-char pos)
205 (funcall pretty-printer data)
206 (setf (marker-position m) pos
207 (ewoc--node-left elemnode) (ewoc--node-left node)
208 (ewoc--node-right elemnode) node 203 (ewoc--node-right elemnode) node
209 (ewoc--node-right (ewoc--node-left node)) elemnode 204 (ewoc--node-right (ewoc--node-left node)) elemnode
210 (ewoc--node-left node) elemnode) 205 (ewoc--node-left node) elemnode)
211 (ewoc--adjust pos (point) node) 206 (ewoc--refresh-node pretty-printer elemnode)
212 elemnode))) 207 elemnode)))
213 208
214(defun ewoc--refresh-node (pp node) 209(defun ewoc--refresh-node (pp node)
@@ -584,10 +579,10 @@ Return nil if the buffer has been deleted."
584 579
585(provide 'ewoc) 580(provide 'ewoc)
586 581
587;;; Local Variables: 582;; Local Variables:
588;;; eval: (put 'ewoc--set-buffer-bind-dll 'lisp-indent-hook 1) 583;; eval: (put 'ewoc--set-buffer-bind-dll 'lisp-indent-hook 1)
589;;; eval: (put 'ewoc--set-buffer-bind-dll-let* 'lisp-indent-hook 2) 584;; eval: (put 'ewoc--set-buffer-bind-dll-let* 'lisp-indent-hook 2)
590;;; End: 585;; End:
591 586
592;;; arch-tag: d78915b9-9a07-44bf-aac6-04a1fc1bd6d4 587;; arch-tag: d78915b9-9a07-44bf-aac6-04a1fc1bd6d4
593;;; ewoc.el ends here 588;;; ewoc.el ends here