On 6 January 2013 18:20, Robert 'Bobby' Zenz <[email protected]>wrote:
> Hello.
>
> Thanks for letting us know.
> Personally I'd really like to contribute to Sawfish (because it is
> awesome),
> but I find it hard to wrap my head around Lisp. Is there some secret to
> understand the source? I know that question is dumb, but is there some sort
> of documentation like "If you look for the windowrules, go to the files x,
> y
> and z"?
Robert,
If the question is about lisp itself, the I would recommend just going
through some of the many scheme tutorials out there on the web. There are
many!
librep started off as a more emacs-like lisp, but it later morphed into a
more scheme-like lisp, but with the following caveats:
+ with commonlisp-style macros (which in any case are easier to work with
for newbies than scheme macros anyway)
+ minus any SRFI's (general scheme libraries which are available for most
scheme implementations)
So basically, treat librep like a simplistic scheme. Which still makes it
better than most other choices (even if you end up yearning for more
full-featured scheme implementations like racket, gauche, etc)
Re: the sawfish code itself. The info docs for librep and sawfish are
pretty good. They break things down by topic, and also have a neat function
index as well. If you're not into emacs, then I can suggest alternative
info viewers like pinfo (I believe kde also allows you to view info pages
in its help browser, translating info to html)
That, plus running something like ctags over the sawfish lisp directories
should get you quickly to where you want to go.
Apologies if I'm mindlessly replicating something which is already
somewhere on the sawfish wiki, but just in case it isn't, here's the
section in my ~/.ctags pertaining to rep code:
--langdef=Rep
--langmap=Rep:.jl
--regex-Rep=/\(define-structure[[:space:]]+\({0,1}(\S+)/\1/s,structure/
--regex-Rep=/\(defvar[[:space:]]+\({0,1}(\S+)/\1/v,special-variable/
--regex-Rep=/\(define[[:space:]]+\({0,1}([[:alnum:]!?+~-]+)/\1/f,function/
--regex-Rep=/\(defun[[:space:]]+\({0,1}([[:alnum:]!?+~-]+)/\1/f,function/
--regex-Rep=/\(defmacro[[:space:]]+\({0,1}([[:alnum:]!?+~-]+)/\1/m,macro/
--regex-Rep=/\(define-macro[[:space:]]+\({0,1}([[:alnum:]!?+~-]+)/\1/m,macro/
Use it like this:
ctags -Rf <file_containing_tags> <path_to_start_indexing>/*
I prefer to keep 3 seperate tags files, 1 for my code, 1 for librep
(/usr/share/rep/x.x.x/lisp/*), and 1 for sawfish
(/usr/share/sawfish/x.x.x/lisp/*)
If you have a half decent editor (I use vim), it should be easy to rebuild
all tags with a single keybindings, plus use the tags to jump to the
definition of something.
--
Regards,
Imran Rafique