下面的例子展示了符号转义的过程。我们首先用 fset 设置符号的 函数cell,再用 symbol-function 来获取该函数 cell 的内容(具体查阅 Function Cells)。再具体一些,我们将符号 car 储存进 first 的函数cell,然后将符号 first 储存进 erste 的函数cell。
;; Build this function cell linkage:
;; ------------- ----- ------- -------
;; | #<subr car> | <-- | car | <-- | first | <-- | erste |
;; ------------- ----- ------- -------
(symbol-function 'car)
⇒ #<subr car>
(fset 'first 'car)
⇒ car
(fset 'erste 'first)
⇒ first
(erste '(1 2 3)) ; Call the function referenced by erste.
⇒ 1