Use &aux for (conf)

ご主人様
not manx 4 years ago
parent c4e13c4646
commit 2a5ac4b592
Signed by: C-xC-c
GPG Key ID: F52ED472284EF2F4

3
.gitignore vendored

@ -1,2 +1,3 @@
src/config.lisp
\#*#
\#*#
backups/

@ -13,7 +13,7 @@
(defparameter *flags-txt* nil)
(defparameter conn nil)
(defvar get-posts-sql "SELECT posts.post_nr, flags.flag from flags left join postflags on (postflags.flag = flags.id) left join posts on (postflags.post_nr = posts.id) where posts.post_nr in (~{'~a'~^,~}) and posts.board = '~a';")
(defparameter get-posts-sql "SELECT posts.post_nr, flags.flag from flags left join postflags on (postflags.flag = flags.id) left join posts on (postflags.post_nr = posts.id) where posts.post_nr in (~{'~a'~^,~}) and posts.board = '~a';")
(defmacro dbfun (name &rest body)
`(defun ,name ,(car body)

@ -6,11 +6,10 @@
(defvar empty-flag '("empty, or there were errors. Re-set your flags."))
(defun conf (thing)
(let ((item (nth 1 (assoc thing config))))
(if (null item)
(error "no such config item" thing)
item)))
(defun conf (thing &aux (item (cadr (assoc thing config))))
(if (null item)
(error "no such config item" thing)
item))
(defun set-boards ()
(setf *boards* (make-hash-table :test 'equal))
@ -56,5 +55,5 @@
(boardp board)))
;; Content types
(defvar @json "application/json")
(defvar @plain "text/plain")
(defparameter @json "application/json")
(defparameter @plain "text/plain")

Loading…
Cancel
Save