[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Sat Oct 10 07:56:37 UTC 2009


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv23702

Modified Files:
	slime.el ChangeLog 
Log Message:
	* slime.el (slime-length=): Fix (slime-length= '() 0).
	(slime-eval-feature-expression): Fix. Couldn't handle (NOT)
	and (NOT FOO BAR).


--- /project/slime/cvsroot/slime/slime.el	2009/09/20 09:39:16	1.1224
+++ /project/slime/cvsroot/slime/slime.el	2009/10/10 07:56:37	1.1225
@@ -8321,8 +8321,10 @@
   (etypecase seq
     (list
      (let ((list seq))
-       (setq list (nthcdr (1- n) list))
-       (and list (null (cdr list)))))
+       (if (and (null list) (zerop n))
+           t
+           (let ((tail (nthcdr (1- n) list)))
+             (and tail (null (cdr tail)))))))
     (sequence
      (= (length seq) n))))
 
@@ -8450,8 +8452,12 @@
                 name 
               (concat ":" name)))))
 
+(put 'slime-incorrect-feature-expression
+     'error-conditions '(slime-incorrect-feature-expression error))
+
 (put 'slime-unknown-feature-expression
-     'error-conditions '(slime-unknown-feature-expression error))
+     'error-conditions '(slime-unknown-feature-expression 
+                         slime-incorrect-feature-expression))
 
 (defun slime-eval-feature-expression (e)
   "Interpret a reader conditional expression."
@@ -8462,11 +8468,18 @@
                     (case head
                       (:and #'every)
                       (:or #'some)
-                      (:not (lambda (f l) (not (apply f l))))
+                      (:not 
+                         (lexical-let ((feature-expression e))
+                           (lambda (f l) 
+                             (cond 
+                               ((slime-length= l 0) t)
+                               ((slime-length= l 1) (not (apply f l)))
+                               (t (signal 'slime-incorrect-feature-expression 
+                                          feature-expression))))))
                       (t (signal 'slime-unknown-feature-expression head))))
                   #'slime-eval-feature-expression
                   (cdr e)))
-        (t (signal 'slime-unknown-feature-expression e))))
+        (t (signal 'slime-incorrect-feature-expression e))))
 
 ;;;;; Extracting Lisp forms from the buffer or user
 
--- /project/slime/cvsroot/slime/ChangeLog	2009/10/09 23:05:12	1.1870
+++ /project/slime/cvsroot/slime/ChangeLog	2009/10/10 07:56:37	1.1871
@@ -1,3 +1,9 @@
+2009-10-10  Tobias C. Rittweiler <tcr at freebits.de>
+
+	* slime.el (slime-length=): Fix (slime-length= '() 0).
+	(slime-eval-feature-expression): Fix. Couldn't handle (NOT)
+	and (NOT FOO BAR).
+
 2009-10-09  Stas Boukarev  <stassats at gmail.com>
 
 	* swank.lisp (stop-server): (list-threads) returns threads offset by 1,





More information about the slime-cvs mailing list