aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/ewoc.el
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2000-10-15 05:16:36 +0000
committerStefan Monnier <[email protected]>2000-10-15 05:16:36 +0000
commit10c471e6a30a1d206093d03f42ab7866044ab5bb (patch)
tree393aa0985fe38593e7c98606758aa15f01736c0d /lisp/emacs-lisp/ewoc.el
parent8b7707e1becc57ec9598573b7f8c14523a27ae93 (diff)
(ewoc-location): New function.
(ewoc-enter-after, ewoc-enter-before): Document return value.
Diffstat (limited to 'lisp/emacs-lisp/ewoc.el')
-rw-r--r--lisp/emacs-lisp/ewoc.el21
1 files changed, 14 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el
index bcf8a732a1..90d2addca6 100644
--- a/lisp/emacs-lisp/ewoc.el
+++ b/lisp/emacs-lisp/ewoc.el
@@ -31,9 +31,9 @@
;; But now it's Emacs' Widget for Object Collections
;; As the name implies this derives from the `cookie' package (part
-;; of Elib). The changes are mostly superficial:
+;; of Elib). The changes are pervasive though mostly superficial:
-;; - uses CL (and its `defstruct'
+;; - uses CL (and its `defstruct')
;; - separate from Elib.
;; - uses its own version of a doubly-linked list which allows us
;; to merge the elib-wrapper and the elib-node structures into ewoc-node
@@ -74,9 +74,9 @@
;; to the buffer contents.
;;
;; A `ewoc--node' is an object that contains one element. There are
-;; functions in this package that given an ewoc--node extracts the data, or
-;; gives the next or previous ewoc--node. (All ewoc--nodes are linked together
-;; in a doubly linked list. The 'previous' ewoc--node is the one that appears
+;; functions in this package that given an ewoc--node extract the data, or
+;; give the next or previous ewoc--node. (All ewoc--nodes are linked together
+;; in a doubly linked list. The `previous' ewoc--node is the one that appears
;; before the other in the buffer.) You should not do anything with
;; an ewoc--node except pass it to the functions in this package.
;;
@@ -95,6 +95,7 @@
;;
;; (defun ewoc-create (pretty-printer &optional header footer)
;; (defalias 'ewoc-data 'ewoc--node-data)
+;; (defun ewoc-location (node)
;; (defun ewoc-enter-first (ewoc data)
;; (defun ewoc-enter-last (ewoc data)
;; (defun ewoc-enter-after (ewoc node data)
@@ -196,6 +197,10 @@ and (ewoc--node-nth dll -1) returns the last node."
(setq n (1- n)))
(unless (eq dll node) node)))
+(defun ewoc-location (node)
+ "Return the start location of NODE."
+ (ewoc--node-start-marker node))
+
;;; The ewoc data type
@@ -336,12 +341,14 @@ be inserted at the bottom of the ewoc."
(defun ewoc-enter-after (ewoc node data)
- "Enter a new element DATA after NODE in EWOC."
+ "Enter a new element DATA after NODE in EWOC.
+Returns the new NODE."
(ewoc--set-buffer-bind-dll ewoc
(ewoc-enter-before ewoc (ewoc--node-next dll node) data)))
(defun ewoc-enter-before (ewoc node data)
- "Enter a new element DATA before NODE in EWOC."
+ "Enter a new element DATA before NODE in EWOC.
+Returns the new NODE."
(ewoc--set-buffer-bind-dll ewoc
(ewoc--node-enter-before
node