diff options
| author | Thien-Thi Nguyen | 2005-06-11 20:33:28 +0000 |
|---|---|---|
| committer | Thien-Thi Nguyen | 2005-06-11 20:33:28 +0000 |
| commit | d4ddf7839cf2c4a7d58f294880dd556a683ec0ed (patch) | |
| tree | 716497d03f63d9bdc27fe698d56c0d54efff45d3 /lisp | |
| parent | 2e09fef1ac0317fc63a1a628de0cb7371c1427d1 (diff) | |
| download | emacs-d4ddf7839cf2c4a7d58f294880dd556a683ec0ed.tar.gz emacs-d4ddf7839cf2c4a7d58f294880dd556a683ec0ed.zip | |
Doc fixes for public funcs:
"Returns" to "return", document useful return values, etc.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/ewoc.el | 36 |
2 files changed, 24 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 663b3ff3d4b..530a589dd8a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-06-11 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp/ewoc.el: Doc fixes for public funcs: | ||
| 4 | "Returns" to "return", document useful return values, etc. | ||
| 5 | |||
| 1 | 2005-06-11 Alan Mackenzie <acm@muc.de> | 6 | 2005-06-11 Alan Mackenzie <acm@muc.de> |
| 2 | 7 | ||
| 3 | * fill.el (fill-context-prefix): Try `adaptive-fill-function' | 8 | * fill.el (fill-context-prefix): Try `adaptive-fill-function' |
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index a2cb4e9fe46..9f91dbab0e9 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el | |||
| @@ -264,7 +264,7 @@ start position and the element DATA." | |||
| 264 | 264 | ||
| 265 | (defun ewoc--delete-node-internal (ewoc node) | 265 | (defun ewoc--delete-node-internal (ewoc node) |
| 266 | "Delete a data string from EWOC. | 266 | "Delete a data string from EWOC. |
| 267 | Can not be used on the footer. Returns the wrapper that is deleted. | 267 | Can not be used on the footer. Return the wrapper that is deleted. |
| 268 | The start-marker in the wrapper is set to nil, so that it doesn't | 268 | The start-marker in the wrapper is set to nil, so that it doesn't |
| 269 | consume any more resources." | 269 | consume any more resources." |
| 270 | (let ((dll (ewoc--dll ewoc)) | 270 | (let ((dll (ewoc--dll ewoc)) |
| @@ -334,25 +334,27 @@ be inserted at the bottom of the ewoc." | |||
| 334 | (defalias 'ewoc-data 'ewoc--node-data) | 334 | (defalias 'ewoc-data 'ewoc--node-data) |
| 335 | 335 | ||
| 336 | (defun ewoc-enter-first (ewoc data) | 336 | (defun ewoc-enter-first (ewoc data) |
| 337 | "Enter DATA first in EWOC." | 337 | "Enter DATA first in EWOC. |
| 338 | Return the new node." | ||
| 338 | (ewoc--set-buffer-bind-dll ewoc | 339 | (ewoc--set-buffer-bind-dll ewoc |
| 339 | (ewoc-enter-after ewoc (ewoc--node-nth dll 0) data))) | 340 | (ewoc-enter-after ewoc (ewoc--node-nth dll 0) data))) |
| 340 | 341 | ||
| 341 | (defun ewoc-enter-last (ewoc data) | 342 | (defun ewoc-enter-last (ewoc data) |
| 342 | "Enter DATA last in EWOC." | 343 | "Enter DATA last in EWOC. |
| 344 | Return the new node." | ||
| 343 | (ewoc--set-buffer-bind-dll ewoc | 345 | (ewoc--set-buffer-bind-dll ewoc |
| 344 | (ewoc-enter-before ewoc (ewoc--node-nth dll -1) data))) | 346 | (ewoc-enter-before ewoc (ewoc--node-nth dll -1) data))) |
| 345 | 347 | ||
| 346 | 348 | ||
| 347 | (defun ewoc-enter-after (ewoc node data) | 349 | (defun ewoc-enter-after (ewoc node data) |
| 348 | "Enter a new element DATA after NODE in EWOC. | 350 | "Enter a new element DATA after NODE in EWOC. |
| 349 | Returns the new NODE." | 351 | Return the new node." |
| 350 | (ewoc--set-buffer-bind-dll ewoc | 352 | (ewoc--set-buffer-bind-dll ewoc |
| 351 | (ewoc-enter-before ewoc (ewoc--node-next dll node) data))) | 353 | (ewoc-enter-before ewoc (ewoc--node-next dll node) data))) |
| 352 | 354 | ||
| 353 | (defun ewoc-enter-before (ewoc node data) | 355 | (defun ewoc-enter-before (ewoc node data) |
| 354 | "Enter a new element DATA before NODE in EWOC. | 356 | "Enter a new element DATA before NODE in EWOC. |
| 355 | Returns the new NODE." | 357 | Return the new node." |
| 356 | (ewoc--set-buffer-bind-dll ewoc | 358 | (ewoc--set-buffer-bind-dll ewoc |
| 357 | (ewoc--node-enter-before | 359 | (ewoc--node-enter-before |
| 358 | node | 360 | node |
| @@ -362,15 +364,15 @@ Returns the new NODE." | |||
| 362 | (ewoc--node-start-marker node))))) | 364 | (ewoc--node-start-marker node))))) |
| 363 | 365 | ||
| 364 | (defun ewoc-next (ewoc node) | 366 | (defun ewoc-next (ewoc node) |
| 365 | "Get the next node. | 367 | "Return the node in EWOC that follows NODE. |
| 366 | Returns nil if NODE is nil or the last element." | 368 | Return nil if NODE is nil or the last element." |
| 367 | (when node | 369 | (when node |
| 368 | (ewoc--filter-hf-nodes | 370 | (ewoc--filter-hf-nodes |
| 369 | ewoc (ewoc--node-next (ewoc--dll ewoc) node)))) | 371 | ewoc (ewoc--node-next (ewoc--dll ewoc) node)))) |
| 370 | 372 | ||
| 371 | (defun ewoc-prev (ewoc node) | 373 | (defun ewoc-prev (ewoc node) |
| 372 | "Get the previous node. | 374 | "Return the node in EWOC that precedes NODE. |
| 373 | Returns nil if NODE is nil or the first element." | 375 | Return nil if NODE is nil or the first element." |
| 374 | (when node | 376 | (when node |
| 375 | (ewoc--filter-hf-nodes | 377 | (ewoc--filter-hf-nodes |
| 376 | ewoc | 378 | ewoc |
| @@ -497,16 +499,16 @@ If the EWOC is empty, nil is returned." | |||
| 497 | best-guess))))))) | 499 | best-guess))))))) |
| 498 | 500 | ||
| 499 | (defun ewoc-invalidate (ewoc &rest nodes) | 501 | (defun ewoc-invalidate (ewoc &rest nodes) |
| 500 | "Refresh some elements. | 502 | "Call EWOC's pretty-printer for each element in NODES. |
| 501 | The pretty-printer set for EWOC will be called for all NODES." | 503 | Delete current text first, thus effecting a \"refresh\"." |
| 502 | (ewoc--set-buffer-bind-dll ewoc | 504 | (ewoc--set-buffer-bind-dll ewoc |
| 503 | (dolist (node nodes) | 505 | (dolist (node nodes) |
| 504 | (ewoc--refresh-node (ewoc--pretty-printer ewoc) node)))) | 506 | (ewoc--refresh-node (ewoc--pretty-printer ewoc) node)))) |
| 505 | 507 | ||
| 506 | (defun ewoc-goto-prev (ewoc arg) | 508 | (defun ewoc-goto-prev (ewoc arg) |
| 507 | "Move point to the ARGth previous element. | 509 | "Move point to the ARGth previous element in EWOC. |
| 508 | Don't move if we are at the first element, or if EWOC is empty. | 510 | Don't move if we are at the first element, or if EWOC is empty. |
| 509 | Returns the node we moved to." | 511 | Return the node we moved to." |
| 510 | (ewoc--set-buffer-bind-dll-let* ewoc | 512 | (ewoc--set-buffer-bind-dll-let* ewoc |
| 511 | ((node (ewoc-locate ewoc (point)))) | 513 | ((node (ewoc-locate ewoc (point)))) |
| 512 | (when node | 514 | (when node |
| @@ -522,8 +524,8 @@ Returns the node we moved to." | |||
| 522 | (ewoc-goto-node ewoc node)))) | 524 | (ewoc-goto-node ewoc node)))) |
| 523 | 525 | ||
| 524 | (defun ewoc-goto-next (ewoc arg) | 526 | (defun ewoc-goto-next (ewoc arg) |
| 525 | "Move point to the ARGth next element. | 527 | "Move point to the ARGth next element in EWOC. |
| 526 | Returns the node (or nil if we just passed the last node)." | 528 | Return the node (or nil if we just passed the last node)." |
| 527 | (ewoc--set-buffer-bind-dll-let* ewoc | 529 | (ewoc--set-buffer-bind-dll-let* ewoc |
| 528 | ((node (ewoc-locate ewoc (point)))) | 530 | ((node (ewoc-locate ewoc (point)))) |
| 529 | (while (and node (> arg 0)) | 531 | (while (and node (> arg 0)) |
| @@ -535,7 +537,7 @@ Returns the node (or nil if we just passed the last node)." | |||
| 535 | (ewoc-goto-node ewoc node))) | 537 | (ewoc-goto-node ewoc node))) |
| 536 | 538 | ||
| 537 | (defun ewoc-goto-node (ewoc node) | 539 | (defun ewoc-goto-node (ewoc node) |
| 538 | "Move point to NODE." | 540 | "Move point to NODE in EWOC." |
| 539 | (ewoc--set-buffer-bind-dll ewoc | 541 | (ewoc--set-buffer-bind-dll ewoc |
| 540 | (goto-char (ewoc--node-start-marker node)) | 542 | (goto-char (ewoc--node-start-marker node)) |
| 541 | (if goal-column (move-to-column goal-column)) | 543 | (if goal-column (move-to-column goal-column)) |
| @@ -586,7 +588,7 @@ remaining arguments will be passed to PREDICATE." | |||
| 586 | 588 | ||
| 587 | (defun ewoc-buffer (ewoc) | 589 | (defun ewoc-buffer (ewoc) |
| 588 | "Return the buffer that is associated with EWOC. | 590 | "Return the buffer that is associated with EWOC. |
| 589 | Returns nil if the buffer has been deleted." | 591 | Return nil if the buffer has been deleted." |
| 590 | (let ((buf (ewoc--buffer ewoc))) | 592 | (let ((buf (ewoc--buffer ewoc))) |
| 591 | (when (buffer-name buf) buf))) | 593 | (when (buffer-name buf) buf))) |
| 592 | 594 | ||