]> code.delx.au - gnu-emacs-elpa/commitdiff
yas--document-symbols: respect level arg, raise to 1
authorNoam Postavsky <npostavs@users.sourceforge.net>
Tue, 24 Dec 2013 16:36:16 +0000 (11:36 -0500)
committerNoam Postavsky <npostavs@users.sourceforge.net>
Tue, 24 Dec 2013 16:36:16 +0000 (11:36 -0500)
doc/snippet-reference.org
doc/yas-doc-helper.el

index 3dd674f15744ca5f88e0990344a5302bd0ceda3d..a38fca5a906758962332216bf80bd4640b11d87a 100644 (file)
@@ -2,14 +2,11 @@
 
 #+TITLE: Reference
 
-* Reference
-
 #+BEGIN_SRC emacs-lisp :exports results :results value raw
-(yas--document-symbols 2 `("Interactive functions" . ,#'interactive-form)
+(yas--document-symbols 1 `("Interactive functions" . ,#'interactive-form)
                          `("Customization variables" . ,#'(lambda (sym)
                                                             (and (boundp sym)
                                                                  (get sym 'standard-value))))
                          `("Useful functions" . ,#'fboundp)
                          `("Useful variables" . ,#'boundp))
 #+END_SRC
-  
index a782c1fee78bb267871a46099b514f6934a55f73..cec818c7d879966caad334af7bd4b8746d2d6ce5 100755 (executable)
@@ -91,7 +91,8 @@
                     body))))
 
 (defun yas--document-symbols (level &rest names-and-predicates)
-  (let ((sym-lists (make-vector (length names-and-predicates) nil)))
+  (let ((sym-lists (make-vector (length names-and-predicates) nil))
+        (stars (make-string level ?*)))
     (loop for sym in yas--exported-syms
           do (loop for test in (mapcar #'cdr names-and-predicates)
                    for i from 0
                         (return))))
     (loop for slist across sym-lists
           for name in (mapcar #'car names-and-predicates)
-          concat (format "\n** %s\n" name)
+          concat (format "\n%s %s\n" stars name)
           concat (mapconcat (lambda (sym)
                               (yas--document-symbol sym (1+ level)))
                             slist "\n\n"))))