(find-symbol-homes paths package)))
(defun best-package-name (package)
- (car (sort (cons (package-name package)
- (copy-list (package-nicknames package)))
- #'< :key #'length)))
+
+ ;; We pick the shortest one. Strangely, there's no `find minimal thing
+ ;; according to this valuation' function in Common Lisp.
+ (loop with best = (package-name package)
+ with best-length = (length best)
+ for name in (package-nicknames package)
+ for name-length = (length name)
+ when (< name-length best-length)
+ do (setf best name
+ best-length name-length)
+ finally (return best)))
(defvar charbuf-size 0)