[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Common Lisp indentation tables for GNU Emacs



Well, here's what I've got so far (it's incomplete):

(setq *indent-alist*
      (nconc *indent-alist*
	     '((defun . 2)
	       (defhashfun . 2)
	       (with-open-file . 1)
	       (ff:defcstruct . 1)
	       (ff:defforeign . 1)
	       (eval-when . 1)
	       (lisp:eval-when . 1)
	       (let . 1)
	       (lisp:let . 1) 
	       (let* . 1)
	       (lisp:let* . 1)
	       (case . 1)
	       (ecase . 1)
	       (ccase . 1)
	       (typecase . 1)
	       (etypecase . 1)
	       (ctypecase . 1)
	       (when . 1)
	       (lisp:when . 1)
	       (unless . 1)
	       (dotimes . 1)
	       (do-symbols . 1)
	       (do-external-symbols . 1)
	       (funcall . 1)
	       (multiple-value-setq . 1)
	       (multiple-value-bind . 2)
	       (prog . 1)
	       (prog* . 1)
	       (select . 1)
	       (with-open-stream . 1)
	       (with-input-from-string . 1)
	       (with-output-to-string . 1)
	       (mapcar . 1)
	       (maplist . 1)
	       (mapc . 1)
	       (map1 . 1)
	       (mapcan . 1)
	       (mapcon . 1)
	       (map . 2))))

(defun set-lisp-indentation ()
  (interactive)
  (let ((tail *indent-alist*))
    (while tail
      (let ((pair (car tail)))
	(put (car pair) lisp-indent-hook (cdr pair))
	(setq tail (cdr tail))))))