stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [STUMP] Is it appropriate to modify the eval-line functioninuser.lis


From: Michael Raskin
Subject: Re: [STUMP] Is it appropriate to modify the eval-line functioninuser.lisp ?
Date: Tue, 16 Oct 2012 16:04:35 +0400

>Yes, i have tested it by adding it to ~/.stumpwmrc . I want to know  
>whether it is safe or not to modify user.lisp directly.

I think it should be quite safe.

>在 Tue, 16 Oct 2012 16:50:09 +0800,Michael Raskin <address@hidden>  
>写道:
>
>>> 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.
>>
>>
>>
>
>
>-- 
>使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]