【发布时间】:2009-12-28 20:19:36
【问题描述】:
在我的 elisp 模块的顶部,我想做一些简单的事情:
(message (concat "Loading " (expand-file-name (current-elisp-module) ".")))
【问题讨论】:
在我的 elisp 模块的顶部,我想做一些简单的事情:
(message (concat "Loading " (expand-file-name (current-elisp-module) ".")))
【问题讨论】:
可以使用变量load-file-name,由函数load设置,文档如下:
`load' 正在加载的文件的全名。
如手册所述:
当 Emacs 正在加载一个文件时,这个变量的值就是那个文件的名字,正如 Emacs 在本节前面描述的搜索过程中找到的那样。
注意:buffer-file-name 作为例行程序并不像您预期的那样工作。
【讨论】: