S4M*_*S4M 4 emacs colors common-lisp
我想控制Common Lisp中显示的文本的颜色。像这样的伪代码:
(print-color (:red "hello") (:blue "world"))
Run Code Online (Sandbox Code Playgroud)
有什么办法可以做到吗?我使用SBCL,我的代表在emacs中。谢谢!
您可以使用ANSI转义码来打印彩色文本:
(format t "~c[31mabc~c[0m~%" #\ESC #\ESC) ; this prints a red "abc" for most modern terminals
Run Code Online (Sandbox Code Playgroud)
我不确定这是否适用于粘液。
归档时间: |
|
查看次数: |
1366 次 |
最近记录: |