Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
LISP
Edit
PageHistory
Diff
Info
LikePages
You are viewing an old revision of this page.
View the current version
.
__LIS__t __P__rocessing. a ' makes something a quote (ie a string). So: '(elem1 elem2 elem3) is a list. setq makes something a global variable. (? - what's the difference between setq and let someone?) (setq mylist '(a b c)) car returns the first element of a list: (print (car mylist)) a cdr returns the rest of the list (ie all-but-first): (print (cdr mylist)) (b c) And that is basically LISP ;) emacs is completely scriptable in LISP - look in /usr/share/emacs/site-lisp/*.el for the start-up and config files. Here is an emacs lisp example from po-mode.el. It only has a maximum of 8 closing brackets in a row, but I didn't look very hard. ;; Handle missing `with-temp-buffer' function. (eval-and-compile (if nil ; FIXME: just testing... (fboundp 'with-temp-buffer) (fset 'po-with-temp-buffer (symbol-function 'with-temp-buffer)) (defmacro po-with-temp-buffer (&rest forms) "Create a temporary buffer, and evaluate FORMS there like `progn'." (let ((curr-buffer (make-symbol "curr-buffer")) (temp-buffer (make-symbol "temp-buffer"))) `(let ((,curr-buffer (current-buffer)) (,temp-buffer (get-buffer-create (generate-new-buffer-name " *po-temp*")))) (unwind-protect (progn (set-buffer ,temp-buffer) ,@forms) (set-buffer ,curr-buffer) (and (buffer-name ,temp-buffer) (kill-buffer ,temp-buffer))))))))
21 pages link to
LISP
:
QuickLispTutorial
CastingPointerToFunction
Lisp
Elisp
VirtualMachine
CommonLisp
PrefixNotation
Scheme
APL
ReversePolish
SymbolicManipulation
LambdaCalculus
LinkedList
Introspection
HigherOrderFunctions
UnLambda
SawFish
XML
StrictEvaluation
WhyIHatePerl
InterestingLinks