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