[slime-cvs] CVS slime
heller
heller at common-lisp.net
Wed Sep 19 11:26:48 UTC 2007
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv13498
Modified Files:
ChangeLog slime.el
Log Message:
Simplify slime-length=.
* slime.el (slime-length=, slime-length>): No need for vectors.
--- /project/slime/cvsroot/slime/ChangeLog 2007/09/19 11:21:44 1.1221
+++ /project/slime/cvsroot/slime/ChangeLog 2007/09/19 11:26:48 1.1222
@@ -1,5 +1,9 @@
2007-09-19 Helmut Eller <heller at common-lisp.net>
+ Simplify slime-length=.
+
+ * slime.el (slime-length=, slime-length>): No need for vectors.
+
Remove explicit support for Scheme mode.
* slime.el (slime-scheme-mode-hook, slime-shared-lisp-mode-hook)
--- /project/slime/cvsroot/slime/slime.el 2007/09/19 11:21:44 1.865
+++ /project/slime/cvsroot/slime/slime.el 2007/09/19 11:26:48 1.866
@@ -9003,25 +9003,14 @@
;;;;; Misc.
-(defun slime-length= (seq n)
- "Test for whether SEQ contains N number of elements. I.e. it's equivalent
- to (= (LENGTH SEQ) N), but besides being more concise, it may also be more
- efficiently implemented."
- (etypecase seq
- (list (do ((i n (1- i))
- (list seq (cdr list)))
- ((or (<= i 0) (null list))
- (and (zerop i) (null list)))))
- (sequence (= (length seq) n))))
-
-(defun slime-length> (seq n)
- "Test if (length SEQ) is greater than N."
- (etypecase seq
- (list (while (and (> n 0) seq)
- (setq seq (cdr seq))
- (decf n))
- (or (< n 0) (and seq t)))
- (sequence (> (length seq) n))))
+(defun slime-length= (list n)
+ "Return t if (= (length LIST) N)."
+ (setq list (nthcdr (1- n) list))
+ (and list (null (cdr list))))
+
+(defun slime-length> (list n)
+ "Return non-nil if (> (length LIST) N)."
+ (nthcdr n list))
(defun slime-split-string (string &optional separators omit-nulls)
"This is like `split-string' in Emacs22, but also works in
More information about the slime-cvs
mailing list