[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[STUMP] Is it appropriate to modify the eval-line function inuser.lisp ?
From: |
Michael Raskin |
Subject: |
[STUMP] Is it appropriate to modify the eval-line function inuser.lisp ? |
Date: |
Tue, 16 Oct 2012 12:50:09 +0400 |
>I want to use the following function to replace the eval-line in user.lisp:
>
>(defcommand eval-me (cmd) ((:rest "Eval> "))
> (with-output-to-string (*standard-output*)
> (handler-case
> (format t "~{~a~^~%~}"
> (mapcar 'prin1-to-string
> (multiple-value-list (eval (read-from-string cmd)))))
> (error (c)
> (format t "~A" c))
Tested:
(defcommand
eval-me (cmd) ((:rest "Eval> "))
(message
"~a"
(with-output-to-string (*standard-output*)
(handler-case
(format t "~{~a~^~%~}"
(mapcar 'prin1-to-string
(multiple-value-list (eval (read-from-string cmd)))))
(error (c)
(format t "~A" c))))))
In .stumpwmrc works as you wanted. You can easily rebind it to ":", of
course.