diff options
| author | Chong Yidong | 2009-08-22 14:37:23 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-08-22 14:37:23 +0000 |
| commit | 8397ae74054225c2aaadbc917101b506a3c0a3c3 (patch) | |
| tree | 12a8ee970cf435b1be37767ea89e4e0f46f69560 | |
| parent | 18ac3e1edd392421e0d6696973cb8620beddb7eb (diff) | |
| download | emacs-8397ae74054225c2aaadbc917101b506a3c0a3c3.tar.gz emacs-8397ae74054225c2aaadbc917101b506a3c0a3c3.zip | |
eieio-doc.el (eieiodoc--class-indexstring, defvar eieiodoc--class-root): New vars.
(eieiodoc-class, eieiodoc-one-node) Use them to silence compiler.
(eieiodoc-one-node): Use `class' instead of `rclass'. This avoids a
compiler warning for free use of `rclass', which IIUC is always
equal to `class'.
| -rw-r--r-- | lisp/eieio/eieio-doc.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/eieio/eieio-doc.el b/lisp/eieio/eieio-doc.el index 966c489b524..35de848c51c 100644 --- a/lisp/eieio/eieio-doc.el +++ b/lisp/eieio/eieio-doc.el | |||
| @@ -52,6 +52,9 @@ ROOT-CLASS, INDEXSTRING, and SKIPLIST are the same as `eieiodoc-class'." | |||
| 52 | (sit-for 0) | 52 | (sit-for 0) |
| 53 | (eieiodoc-class root-class indexstring skiplist)) | 53 | (eieiodoc-class root-class indexstring skiplist)) |
| 54 | 54 | ||
| 55 | (defvar eieiodoc--class-indexstring) | ||
| 56 | (defvar eieiodoc--class-root) | ||
| 57 | |||
| 55 | (defun eieiodoc-class (root-class indexstring &optional skiplist) | 58 | (defun eieiodoc-class (root-class indexstring &optional skiplist) |
| 56 | "Create documentation starting with ROOT-CLASS. | 59 | "Create documentation starting with ROOT-CLASS. |
| 57 | The first job is to create an indented menu of all the classes | 60 | The first job is to create an indented menu of all the classes |
| @@ -89,7 +92,9 @@ into any menus, nodes or lists." | |||
| 89 | (save-excursion | 92 | (save-excursion |
| 90 | (eieiodoc-main-menu root-class skiplist) | 93 | (eieiodoc-main-menu root-class skiplist) |
| 91 | (insert "\n") | 94 | (insert "\n") |
| 92 | (eieiodoc-recurse root-class 'eieiodoc-one-node nil skiplist))) | 95 | (let ((eieiodoc--class-indexstring indexstring) |
| 96 | (eieiodoc--class-root root-class)) | ||
| 97 | (eieiodoc-recurse root-class 'eieiodoc-one-node nil skiplist)))) | ||
| 93 | 98 | ||
| 94 | (defun eieiodoc-main-menu (class skiplist) | 99 | (defun eieiodoc-main-menu (class skiplist) |
| 95 | "Create a menu of all classes under CLASS indented the correct amount. | 100 | "Create a menu of all classes under CLASS indented the correct amount. |
| @@ -113,8 +118,8 @@ Argument LEVEL is the current level of recursion we have hit." | |||
| 113 | eieiodoc-currently-in-node "\n" | 118 | eieiodoc-currently-in-node "\n" |
| 114 | "@comment node-name, next, previous, up\n" | 119 | "@comment node-name, next, previous, up\n" |
| 115 | "@" eieiodoc-current-section-level " " (symbol-name class) "\n" | 120 | "@" eieiodoc-current-section-level " " (symbol-name class) "\n" |
| 116 | ;; indexstring is grabbed from parent calling function | 121 | "@" eieiodoc--class-indexstring |
| 117 | "@" indexstring "index " (symbol-name class) "\n\n") | 122 | "index " (symbol-name class) "\n\n") |
| 118 | ;; Now lets create a nifty little inheritance tree | 123 | ;; Now lets create a nifty little inheritance tree |
| 119 | (let ((cl class) | 124 | (let ((cl class) |
| 120 | (revlist nil) | 125 | (revlist nil) |
| @@ -124,17 +129,15 @@ Argument LEVEL is the current level of recursion we have hit." | |||
| 124 | cl (class-parent cl))) | 129 | cl (class-parent cl))) |
| 125 | (insert "@table @asis\n@item Inheritance Tree:\n") | 130 | (insert "@table @asis\n@item Inheritance Tree:\n") |
| 126 | (while revlist | 131 | (while revlist |
| 127 | ;; root-class is dragged in from the top-level function | ||
| 128 | (insert "@table @code\n@item " | 132 | (insert "@table @code\n@item " |
| 129 | (if (and (child-of-class-p (car revlist) root-class) | 133 | (if (and (child-of-class-p (car revlist) eieiodoc--class-root) |
| 130 | (not (eq class (car revlist)))) | 134 | (not (eq class (car revlist)))) |
| 131 | (concat "@w{@xref{" (symbol-name (car revlist)) "}.}") | 135 | (concat "@w{@xref{" (symbol-name (car revlist)) "}.}") |
| 132 | (symbol-name (car revlist))) | 136 | (symbol-name (car revlist))) |
| 133 | "\n") | 137 | "\n") |
| 134 | (setq revlist (cdr revlist) | 138 | (setq revlist (cdr revlist) |
| 135 | depth (1+ depth))) | 139 | depth (1+ depth))) |
| 136 | ;; the value of rclass is brought in from caller | 140 | (let ((clist (reverse (aref (class-v class) class-children)))) |
| 137 | (let ((clist (reverse (aref (class-v rclass) class-children)))) | ||
| 138 | (if (not clist) | 141 | (if (not clist) |
| 139 | (insert "No children") | 142 | (insert "No children") |
| 140 | (insert "@table @asis\n@item Children:\n") | 143 | (insert "@table @asis\n@item Children:\n") |