Changeset 12975
- Timestamp:
- 10/16/10 19:03:40 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/top-level.lisp
r12926 r12975 45 45 46 46 (defvar *null-cmd* (gensym)) 47 (defvar *handled-cmd* (gensym)) 47 48 48 49 (defvar *command-char* #\:) … … 377 378 (defun read-cmd (stream) 378 379 (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))))) 390 391 391 392 (defun repl-read-form-fun (in out) … … 397 398 (unless (eq form *null-cmd*) 398 399 (incf *cmd-number*)) 399 (cond ((process-cmd form)) 400 (cond ((or (eq form *null-cmd*) 401 (eq form *handled-cmd*))) 400 402 ((and (> *debug-level* 0) 401 403 (fixnump form))
Note: See TracChangeset
for help on using the changeset viewer.