diff options
Diffstat (limited to 'src/util.lisp')
-rw-r--r-- | src/util.lisp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/util.lisp b/src/util.lisp index 2d35e0c..c4b4df2 100644 --- a/src/util.lisp +++ b/src/util.lisp @@ -79,8 +79,11 @@ supported." ,@(and docstring `(,docstring)) (error ',name :format-control message :format-arguments args)))) +(defmacro form-beginning-with (sym form) + `(and (listp ,form) (eq ',sym (car ,form)))) + (defun strip-declarations (forms) - (loop while (and (listp (car forms)) (eq 'declare (caar forms))) + (loop while (form-beginning-with declare (car forms)) do (pop forms) finally (return forms))) |