File tree 1 file changed +15
-13
lines changed
1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change 124
124
(let* ((eof (cons nil nil ))
125
125
(command (read input nil eof))
126
126
(arglist) (arg) result)
127
- (cond ((eq command eof) )
127
+ (flet ((normal-eval (comm)
128
+ (setq - comm)
129
+ (setq result (eval comm))))
130
+ (cond
131
+ ((eq command eof) )
128
132
((symbolp command)
129
133
; ; (if *history* (add-history (input . buffer)))
130
134
(cond ((fboundp command)
131
135
(setq arglist nil )
132
136
(while (not (eq (setq arg (read input nil eof)) eof))
133
137
(push arg arglist))
134
- (setq - (cons command (nreverse arglist)))
135
- (setq result (eval - )))
136
- ((and (boundp command)
137
- (eq (read input nil eof) eof))
138
- (setq - command)
139
- (setq result (eval command)))
138
+ (if (and (null arglist) (boundp command))
139
+ (normal-eval command) ; ; eval symbol if bound and w/o args
140
+ (normal-eval (cons command (nreverse arglist)))))
141
+ ((boundp command)
142
+ (normal-eval command))
140
143
((find-package (string command)) (in-package (string command)))
141
- (*try-unix*
142
- ( setq - ( list ' unix:system (input . buffer)) )
143
- ( setq result ( unix :system (input . buffer)) ) )
144
- (t (warn " ? ~% " )) ))
144
+ (( and *try-unix*
145
+ ; ; try normal-eval when unix command is not found (errno 127 )
146
+ ( not ( equal (normal-eval ( list ' unix:system (input . buffer))) #x7f00 ))) )
147
+ (t (normal-eval command )) ))
145
148
(t
146
149
; ; (if *history* (add-history (input . buffer)))
147
- (setq - command)
148
- (setq result (eval command)) ))
150
+ (normal-eval command) )))
149
151
result))
150
152
151
153
(defun toplevel-prompt (strm)
You can’t perform that action at this time.
0 commit comments