[slime-cvs] CVS update: slime/swank.lisp
Helmut Eller
heller at common-lisp.net
Wed Jun 1 12:41:09 UTC 2005
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv12391
Modified Files:
swank.lisp
Log Message:
(present-symbol-before-p): Fix docstring; remove optimization; compare
package names correctly.
Date: Wed Jun 1 14:41:07 2005
Author: heller
Index: slime/swank.lisp
diff -u slime/swank.lisp:1.304 slime/swank.lisp:1.305
--- slime/swank.lisp:1.304 Wed Jun 1 14:27:24 2005
+++ slime/swank.lisp Wed Jun 1 14:41:02 2005
@@ -2931,27 +2931,21 @@
(and y (list y)))))
(defun present-symbol-before-p (x y)
- "Return true if A belongs before B in a printed summary of symbols.
+ "Return true if X belongs before Y in a printed summary of symbols.
Sorted alphabetically by package name and then symbol name, except
that symbols accessible in the current package go first."
(declare (type symbol x y))
(flet ((accessible (s)
- (or
- (eq (symbol-package s) *buffer-package*) ; a short-cut
- ;; Test breaks on NIL for package that does not inherit it
- (eq (find-symbol (symbol-name s) *buffer-package*) s))))
+ ;; Test breaks on NIL for package that does not inherit it
+ (eq (find-symbol (symbol-name s) *buffer-package*) s)))
(let ((ax (accessible x)) (ay (accessible y)))
- (if ax
- (if ay
- (string< (symbol-name x) (symbol-name y))
- t)
- (if ay
- nil
- (let ((px (symbol-package x))
- (py (symbol-package y)))
- (if (eq px py)
- (string< (symbol-name x) (symbol-name y))
- (string< px py))))))))
+ (cond ((and ax ay) (string< (symbol-name x) (symbol-name y)))
+ (ax t)
+ (ay nil)
+ (t (let ((px (symbol-package x)) (py (symbol-package y)))
+ (if (eq px py)
+ (string< (symbol-name x) (symbol-name y))
+ (string< (package-name px) (package-name py)))))))))
(let ((regex-hash (make-hash-table :test #'equal)))
(defun compiled-regex (regex-string)
More information about the slime-cvs
mailing list