feat: Progress towards comfortable Lisp editing

This commit is contained in:
Madeleine Sydney
2025-02-02 14:51:04 -07:00
parent a345b5a72d
commit fc14c41edd
11 changed files with 623 additions and 39 deletions

View File

@@ -0,0 +1,15 @@
;;; clj-lib.el -*- lexical-binding: t; -*-
(require 'dash)
(defmacro clj-condp (pred expr &rest clauses)
"TODO: Very unfinished."
(declare (indent defun))
(unless (symbolp pred)
(signal 'wrong-type-argument `(symbolp ,pred)))
(let ((expr* (gensym "expr")))
`(let ((,expr* ,expr))
(cond ,@(mapcar (lambda (x) `((,pred ,expr ,(car x)) ,(nth 1 x)))
clauses)))))
(provide 'clj-lib)