我设置了一个显式文件来通过UI创建自定义。它的名字叫做custom.el
。目前,如果不存在,我使用后面的代码片段来创建该文件。如何通过elisp创建一个空文件?
(defconst custom-file (expand-file-name "custom.el" user-emacs-directory))
(unless (file-exists-p custom-file)
(shell-command (concat "touch " custom-file)))
有一个丑陋的外壳命令touch
中,任何其他elisp的功能都可以做到这一点?
几乎是一个重复:http://stackoverflow.com/q/2592095/596361 –