使用mac加载emacs(在终端中)时出现此错误。编译时字节码似乎有一些错误:
Debugger entered--Lisp error: (void-variable mouse-wheel-mode)
byte-code("304 ^X305^H306307#210305^H310311#210305^H312311#210305^H313314#210 203?^@315316317n!317^K!317320nD!317320^KD!317321nD!317321^KD!257^F"210305^H322323#210305^H324325#210305^H326323#210305^H327325#210^H)207"$
(defvar ccm-map (byte-code "304 ^X305^H306307#210305^H310311#210305^H312311#210305^H313314#210 203?^@315316317n!317^K!317320nD!317320^KD!317321nD!317321^KD!257^F"210305^H322323#210305^H324325#210305^H326323#210305^H327$
require(centered-cursor-mode)
eval-buffer(#<buffer *load*> nil "/Users/nXqd/.emacs.d/init.el" nil t) ; Reading at buffer position 1732
load-with-code-conversion("/Users/nXqd/.emacs.d/init.el" "/Users/nXqd/.emacs.d/init.el" t t)
load("/Users/nXqd/.emacs.d/init" t t)
#[0 "^H205262^@ 306=203^Q^@307^H310Q202;^@ 311=204^^^@307^H312Q202;^@313307314315#203*^@316202;^@313307314317#203:^@320nB^R321202;^@316322^S323^A322211#210^K322=203a^@324325326307^H327Q!"323^A322211#210^K322=203`^@^A^S21$
command-line()
normal-top-level()
如何解决这类问题?
看起来centered-cursor-mode
在不首先需要mwheel
的情况下检查变量mouse-wheel-mode
。如果您在图形模式下运行,该模式将在启动期间自动打开,因此变量会被加载,但显然mwheel
库在终端模式下根本没有加载。
在加载centered-cursor-mode
:之前,尝试将其添加到.emacs.d/init.el
中
(require 'mwheel)