Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


Diff of /src/cmp/cmpenv-api.lsp [914ce2] .. [6ffd74] Maximize Restore

  Switch to side-by-side view

--- a/src/cmp/cmpenv-api.lsp
+++ b/src/cmp/cmpenv-api.lsp
@@ -70,8 +70,8 @@
         (cmp-env-variables env))
-(defun cmp-env-extend-declaration (type arguments &optional (env *cmp-env*))
-  (let ((x (cmp-env-search-declaration type)))
+(defun cmp-env-extend-declaration (type arguments &optional (env *cmp-env*) default)
+  (let ((x (cmp-env-search-declaration type env default)))
     (cmp-env-add-declaration type (append arguments x) env)
@@ -202,10 +202,11 @@
 	when (and (consp i) (var-p (fourth i)))
 	collect (fourth i)))
-(defun cmp-env-search-declaration (kind &optional (env *cmp-env*))
+(defun cmp-env-search-declaration (kind &optional (env *cmp-env*) default)
   (loop for i in (car env)
      when (and (consp i)
                (eq (first i) :declare)
                (eq (second i) kind))
-     return (cddr i)))
+     return (cddr i)
+     finally (return default)))