【发布时间】:2010-09-05 20:50:47
【问题描述】:
很久以前,当我编写我的 .emacs setup[1] 时,我使用了一个 shell 脚本来编译并加入整个事情。这东西现在已经很老了,而且很“硬”,所以我现在正在重写它以替换以下内容:
(defmacro make-new-comment( mode face strcom color1 color2)
(list 'progn
`(make-face ',face)
`(if (not (assoc ,strcom ,(intern (concat (symbol-name mode) "-comments-alist"))))
(setf ,(intern (concat (symbol-name mode) "-comments-alist"))
(append ,(intern (concat (symbol-name mode) "-comments-alist")) '((,strcom . ,face)))
)
)
`(modify-face ',face ,color1 ,color2 nil t nil nil nil nil)
)
)
我发生了一些事情。编译时,我访问几个环境变量,提供有关系统的信息,例如 [2],大多数程序的全名,由使用 comint[3] 的某种模式调用。而不是读取环境变量,我可以使用一些类似 autoconf 的工具来调整 .emacs 文件,然后编译它们。
问题是 autoconf 实在是太难看了。我考虑过 cmake,但是文档很差,尤其是在构建自己的构建系统方面。我不熟悉备用系统。
建议?
[1]:为了清楚起见,.emacs 设置是指我拥有的 30 个左右的文件和两个代码子目录。更不用说几个包(在包含的时候)不是标准 emacs 发行版的一部分。
[2] 我已将 eg 替换为 "",因为显然很多人不知道 eg 的含义。要么,要么他们不知道一个例子是什么。
[3] 如diff-mode、ruby-mode。
【问题讨论】:
-
你为什么不能改变你的 PATH 设置来找到常见的程序,比如 diff ?
-
为什么你需要设置一些环境变量来查找像 diff 或 grep 这样通常应该已经在你的 PATH 中的工具?
-
你为什么要彻底改变这个问题。请开始一个新问题并恢复这个问题。谢谢。
-
当 emacs 通过 GUI 启动时,例如从“开始菜单”或从 Windows“打开方式...”,或其他 GUI 中的等效项,通常没有正确设置 $PATH。可以肯定的是,它没有读取我的 zsh 设置文件。