Changeset 4728


Ignore:
Timestamp:
11/14/03 00:55:46 (18 years ago)
Author:
piso
Message:

PROMPT-PACKAGE-NAME: simpler implementation (avoid SORT).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/top-level.lisp

    r4719 r4728  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: top-level.lisp,v 1.12 2003-11-13 17:50:51 piso Exp $
     4;;; $Id: top-level.lisp,v 1.13 2003-11-14 00:55:46 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    2121
    2222;;; A few things we're gonna be needing...
    23 (mapc #'sys::resolve '(sort position break write make-sequence))
     23;;(mapc #'sys::resolve '(position break write make-sequence))
    2424
    2525(in-package "TOP-LEVEL")
     
    3333
    3434(defun prompt-package-name ()
    35   (car (sort (append
    36               (package-nicknames cl:*package*)
    37               (list (package-name cl:*package*)))
    38              (lambda (a b) (< (length a) (length b))))))
     35  (let ((names (package-nicknames *package*))
     36        (result (package-name *package*)))
     37    (dolist (name names)
     38      (when (< (length name) (length result))
     39        (setf result name)))
     40    result))
    3941
    4042(defun repl-prompt-fun (stream)
Note: See TracChangeset for help on using the changeset viewer.