【发布时间】:2011-11-20 17:21:13
【问题描述】:
所以我在尝试自定义 emacs 方面相对较新。但我真的需要尽快定制。制表符在 emacs 中是个痛点,因为它们是两个空格,之后用任何其他编辑器打开文本都会乱七八糟。
目前,我的 ~/emacs.d/init.el 文件中只有几行:
(setq load-path (concat (getenv "HOME") "/.emacs.d/"))
(set-scroll-bar-mode 'right)
(require 'linum)
(global-linum-mode t)
我在启动 emacs 时遇到错误:
Loading encoded-kb...done
An error has occurred while loading `/Users/mycomp/.emacs.d/init.el':
Symbol's function definition is void: set-scroll-bar-mode
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
我尝试使用 --debug-init 选项对其进行处理,但我的 lisp 知识不足以帮助我找出问题所在。任何关于如何使其工作或将我重定向到一些关于编辑 init.el 文件的好教程的任何帮助都会非常有帮助(是的,我做过关于编辑初始化文件的谷歌教程,但每个教程都很糟糕)。
我假设我在左侧获取行号的代码也是错误的。有人可以帮我吗?非常感谢。
【问题讨论】:
-
你使用的emacs版本可能不支持
set-scroll-bar-mode。您是否添加了该行(如果有,您是从哪里得到的?),还是从另一台机器上复制过来的? -
set-scroll-bar-mode在 GNU Emacs 中可用,至少与 Emacs 20 一样老(超过 10 年)。不知道它是否也适用于早于 20 的版本。也许您使用的 Emacs 不是 GNU Emacs,而您使用的 Emacs 没有set-scroll-bar-mode。例如,不知道 XEmacs 是否有它。 -
我认为在文本终端中使用 Emacs 时滚动条不可用。
标签: emacs customization