Laurent PETIT <laurent.pe...@gmail.com> writes:

Hi!

> Third option : use an editor/IDE which allows you to "fold" docs (one
> by one / fold all / unfold all), and / or to navigate in your source
> code via "code outlines"

BTW, I just noticed that you can use Emacs' hs-minor-mode to fold
top-level forms.  For example, when you fold

  (defmacro when-not
    "Evaluates test. If logical false, evaluates body in an implicit do."
    {:added "1.0"}
    [test & body]
      (list 'if test nil (cons 'do body)))

what's displayed is just

  (defmacro when-not...)

That's pretty nice, but its not very clojure specific.  For example, if
metadata precedes the var name, it doesn't work.

  (def 
   ^{:arglists '([coll])
     :doc "Return the last item in coll, in linear time"
     :added "1.0"
     :static true}
   last (fn ^:static last [s]
          (if (next s)
            (recur (next s))
            (first s))))

becomes just

  (def ...)

But hideshow.el has some customization possibilities, so probably it
could be tuned to do more clojure-specific folding.

Bye,
Tassilo

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to