comparison lisp/emacs-lisp/ewoc.el @ 70685:308a4824e11b

(ewoc-data): Add docstring. (ewoc-nth): Doc fix.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Wed, 17 May 2006 06:10:51 +0000
parents 3441bcebaad1
children 9d6a9b899f95 a5812696f7bf
comparison
equal deleted inserted replaced
70684:bd74847f4dd5 70685:308a4824e11b
278 (ewoc--footer new-ewoc) foot 278 (ewoc--footer new-ewoc) foot
279 (ewoc--header new-ewoc) head)) 279 (ewoc--header new-ewoc) head))
280 ;; Return the ewoc 280 ;; Return the ewoc
281 new-ewoc)) 281 new-ewoc))
282 282
283 (defalias 'ewoc-data 'ewoc--node-data) 283 (defalias 'ewoc-data 'ewoc--node-data
284 "Extract the data encapsulated by NODE and return it.
285
286 \(fn NODE)")
284 287
285 (defun ewoc-enter-first (ewoc data) 288 (defun ewoc-enter-first (ewoc data)
286 "Enter DATA first in EWOC. 289 "Enter DATA first in EWOC.
287 Return the new node." 290 Return the new node."
288 (ewoc--set-buffer-bind-dll ewoc 291 (ewoc--set-buffer-bind-dll ewoc
327 "Return the Nth node. 330 "Return the Nth node.
328 N counts from zero. Return nil if there is less than N elements. 331 N counts from zero. Return nil if there is less than N elements.
329 If N is negative, return the -(N+1)th last element. 332 If N is negative, return the -(N+1)th last element.
330 Thus, (ewoc-nth dll 0) returns the first node, 333 Thus, (ewoc-nth dll 0) returns the first node,
331 and (ewoc-nth dll -1) returns the last node. 334 and (ewoc-nth dll -1) returns the last node.
332 Use `ewoc--node-data' to extract the data from the node." 335 Use `ewoc-data' to extract the data from the node."
333 ;; Skip the header (or footer, if n is negative). 336 ;; Skip the header (or footer, if n is negative).
334 (setq n (if (< n 0) (1- n) (1+ n))) 337 (setq n (if (< n 0) (1- n) (1+ n)))
335 (ewoc--filter-hf-nodes ewoc 338 (ewoc--filter-hf-nodes ewoc
336 (ewoc--node-nth (ewoc--dll ewoc) n))) 339 (ewoc--node-nth (ewoc--dll ewoc) n)))
337 340