|
|
发表于 2005-11-18 19:12:23
|
显示全部楼层
首先说明,.emacs 实际上是 Elisp 程序,因此写 .emacs 或多或少地要理解 Emacs Lisp。学习 Emacs Lisp 是一个比较长的过程,并且 Debian 中有完整的 Emacs Lisp 文档和教程,可以这样安装:
- # apt-get install elisp-manual emacs-lisp-intro
复制代码
然后 C-h i 就可以找到相关的内容了。可以按空格键向下翻页,删除键向上翻页,回车键跳转,L 键后退。
不过最简单的 Elisp 程序很快就能理解,所以这里会解释一下。在 Emacs 里执行 C-h f tool-bar-mode RET 可以得到这样的内容:
- tool-bar-mode is an interactive compiled Lisp function in `tool-bar'.
- (tool-bar-mode &optional ARG)
- Toggle use of the tool bar.
- With numeric ARG, display the tool bar if and only if ARG is positive.
- See `tool-bar-add-item' and `tool-bar-add-item-from-menu' for
- conveniently adding tool bar items.
复制代码
你可以知道 tool-bar-mode 是一个 Lisp 函数,并且有一个可选的参数。第 2 行是调用它的方式。Lisp 函数总是 () 中的第一项,因此这样写:
就可以显示工具栏,而
就不显示工具栏。把它写到 .emacs 中就可以了。 |
|