Changeset 12926


Ignore:
Timestamp:
09/27/10 20:31:43 (13 years ago)
Author:
vvoutilainen
Message:

This patch fixes these two issues in ABCL 0.22.0:

1) Keyword evaluation in the repl is broken. The repl assumes all
keywords are, in fact, repl commands.

2) Repl commands are case sensitive: :help :HELP mean two different things.

Patch by Mahmud Mohamed. On behalf of abcl developers, welcome aboard!

File:
1 edited

Legend:

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

    r12147 r12926  
    349349            len (1- len)))
    350350    (dolist (entry *command-table*)
    351       (when (or (string= string (entry-abbreviation entry))
    352                 (string= string (entry-name entry)))
     351      (when (or (string-equal string (entry-abbreviation entry))
     352                (string-equal string (entry-name entry)))
    353353        (return (entry-command entry))))))
    354354
     
    377377(defun read-cmd (stream)
    378378  (let ((c (peek-char-non-whitespace stream)))
    379     (cond ((eql c *command-char*)
    380            (read-line stream))
    381           ((eql c #\newline)
    382            (read-line stream)
    383            *null-cmd*)
    384           (t
    385            (read stream nil)))))
     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)))))))
    386390
    387391(defun repl-read-form-fun (in out)
Note: See TracChangeset for help on using the changeset viewer.