Created
December 4, 2016 02:26
-
-
Save zhouqiang-cl/d497ca97bc84cbc3be8b02f790e4a67b to your computer and use it in GitHub Desktop.
common lisp 的函数 COPY-READTABLE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
语法 | |
copy-readtable &optional from-readtable to-readtable => readtable | |
参数和值 | |
from-readtable --- 一个 readtable 指示符, 默认为 current readtable | |
to-readtable --- 一个 readtable 或 nil, 默认为 nil | |
readtable --- 如果 to-readtable 不为 nil, 则是to-readtable, 否则是一个新的readtable | |
描述 | |
copy-readtable 拷贝 from-readtable, copy-readtable 同时还拷贝 readtable-case | |
代码 | |
* (set-syntax-from-char #\z #\' (setq table2 (copy-readtable))) | |
T | |
* zvar | |
123 | |
* (copy-readtable table2 *readtable*) | |
#<READTABLE {10000007A3}> | |
* zvar | |
VAR | |
* (setq *readtable* (copy-readtable)) | |
#<READTABLE {1004AD0EA3}> | |
* zvar | |
VAR | |
* (setq *readtable* (copy-readtable nil)) | |
#<READTABLE {1004AE5C53}> | |
* zvar | |
123 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment