Changeset 12975 for trunk/abcl/src/org


Ignore:
Timestamp:
10/16/10 19:03:40 (11 years ago)
Author:
vvoutilainen
Message:

Fix breakage of repl. Commands with parameters work again now.
Keywords are not interpreted as commands, as per the previous
patch for that.

File:
1 edited

Legend:

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

    r12926 r12975  
    4545
    4646(defvar *null-cmd* (gensym))
     47(defvar *handled-cmd* (gensym))
    4748
    4849(defvar *command-char* #\:)
     
    377378(defun read-cmd (stream)
    378379  (let ((c (peek-char-non-whitespace stream)))
    379     (if (eql c #\Newline)
    380   (progn
    381     (read-line stream)
    382     *null-cmd*)
    383   (let ((input (read stream nil)))
    384     (if (not (keywordp input))
    385         input
    386         (let ((name (string-downcase (symbol-name input))))
    387     (if (find-command name)
    388         (concatenate 'string ":" name)
    389         input)))))))
     380    (cond ((eql c *command-char*)
     381           (let* ((input (read-line stream))
     382      (name (symbol-name (read-from-string input))))
     383       (if (find-command name)
     384     (progn (process-cmd input) *handled-cmd*)
     385         (read-from-string (concatenate 'string ":" name)))))
     386          ((eql c #\newline)
     387           (read-line stream)
     388           *null-cmd*)
     389          (t
     390           (read stream nil)))))
    390391
    391392(defun repl-read-form-fun (in out)
     
    397398      (unless (eq form *null-cmd*)
    398399        (incf *cmd-number*))
    399       (cond ((process-cmd form))
     400      (cond ((or (eq form *null-cmd*)
     401     (eq form *handled-cmd*)))
    400402            ((and (> *debug-level* 0)
    401403                  (fixnump form))
Note: See TracChangeset for help on using the changeset viewer.