From df58222fe669388f5d7586896fefee29db5a8b67 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Tue, 24 Dec 2013 11:36:16 -0500 Subject: [PATCH] yas--document-symbols: respect level arg, raise to 1 --- doc/snippet-reference.org | 5 +---- doc/yas-doc-helper.el | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/snippet-reference.org b/doc/snippet-reference.org index 3dd674f15..a38fca5a9 100644 --- a/doc/snippet-reference.org +++ b/doc/snippet-reference.org @@ -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 - diff --git a/doc/yas-doc-helper.el b/doc/yas-doc-helper.el index a782c1fee..cec818c7d 100755 --- a/doc/yas-doc-helper.el +++ b/doc/yas-doc-helper.el @@ -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 @@ -100,7 +101,7 @@ (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")))) -- 2.39.2