From a8b6752ef0581ae04e6663dcea4764aa6d9a99d8 Mon Sep 17 00:00:00 2001 From: Vladimir Sedach Date: Sun, 12 Apr 2009 22:35:15 -0600 Subject: [PATCH] Removed some unnecessary code that ignored an anaphor in define-ps-special-form (declare (ignorable sufficed. --- src/compiler.lisp | 5 ++--- src/utils.lisp | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/compiler.lisp b/src/compiler.lisp index 160ff52..e17b0ad 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -22,13 +22,12 @@ 'expecting' automatically added to the arglist) to the special form is a keyword indicating whether the form is expected to produce an :expression or a :statement." - (let ((args (gensym "ps-arglist-")) - (expecting-used-p (member 'expecting (flatten body)))) + (let ((args (gensym "ps-arglist-"))) `(setf (gethash ',name *ps-special-forms*) (lambda (&rest ,args) (destructuring-bind ,(cons 'expecting lambda-list) ,args - ,(unless expecting-used-p '(declare (ignore expecting))) + (declare (ignorable expecting)) ,@body))))) (defun undefine-ps-special-form (name) diff --git a/src/utils.lisp b/src/utils.lisp index 6d04137..4ce2ab4 100644 --- a/src/utils.lisp +++ b/src/utils.lisp @@ -100,11 +100,6 @@ SOMEGLOBAL." (reduce (lambda (list el) (remove el list :test test)) (cons list1 list2))) -(defun flatten (x &optional acc) - (cond ((null x) acc) - ((atom x) (cons x acc)) - (t (flatten (car x) (flatten (cdr x) acc))))) - (defmacro aif (test-form then-form &optional else-form) `(let ((it ,test-form)) (if it ,then-form ,else-form))) -- 2.20.1