Changeset 5051


Ignore:
Timestamp:
12/10/03 14:30:13 (17 years ago)
Author:
piso
Message:

:pa -

File:
1 edited

Legend:

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

    r5014 r5051  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: top-level.lisp,v 1.16 2003-12-08 02:59:08 piso Exp $
     4;;; $Id: top-level.lisp,v 1.17 2003-12-10 14:30:13 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    8989  (values))
    9090
     91(defvar *old-package* nil)
     92
    9193(defun package-command (args)
    9294  (cond ((null args)
    9395         (format *standard-output* "The ~A package is current.~%"
    9496                 (package-name *package*)))
     97        ((and *old-package* (string= args "-") (null (find-package "-")))
     98         (rotatef *old-package* *package*))
    9599        (t
    96100         (when (and (plusp (length args)) (eql (char args 0) #\:))
     
    98102         (setf args (nstring-upcase args))
    99103         (let ((pkg (find-package args)))
    100            (if pkg
    101                (setf *package* pkg)
    102                (format *standard-output* "Unknown package ~A.~%" args))))))
     104           (unless pkg
     105             (format *standard-output* "Unknown package ~A.~%" args))
     106           (setf *old-package* *package*
     107                 *package* pkg)))))
    103108
    104109(defun reset-command (ignored)
Note: See TracChangeset for help on using the changeset viewer.