summaryrefslogtreecommitdiff
path: root/Lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-02-04 23:32:27 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-02-04 23:32:27 +0100
commit65fdaf41edaa12ef4e6fe454589c06b77dd33213 (patch)
tree51076058f7379fbf88e93e63f3892b3892beb182 /Lisp
parent800230afe4bab552fb4409432a27307ac1e9fabb (diff)
Simplify CONSTRUCTOR-NAME-P.
darcs-hash:5ddd574a447dc3a34f13e938df4f3b63b26d5be9
Diffstat (limited to 'Lisp')
-rw-r--r--Lisp/method-invocation.lisp9
1 files changed, 3 insertions, 6 deletions
diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp
index 9aae94d..b77765f 100644
--- a/Lisp/method-invocation.lisp
+++ b/Lisp/method-invocation.lisp
@@ -500,12 +500,9 @@ easier to use with __apply__.
;;; (@* "Helper functions")
(defun constructor-name-p (method-name)
(flet ((method-name-starts-with (prefix)
- (and (>= (length method-name) (length prefix))
- (or (and (string= prefix
- (subseq method-name 0 (length prefix)))
- (or (= (length method-name)
- (length prefix))
- (not (lower-case-p (char method-name (length prefix))))))))))
+ (or (not (mismatch method-name prefix))
+ (>= (mismatch method-name prefix)
+ (length prefix)))))
(or (method-name-starts-with "alloc")
(method-name-starts-with "new"))))