emacs - smart-operator.el 不自动加载...什么给出了?

标签 emacs elisp

我正在尝试在 emacs 中使用 smart-operator.el。我已将以下内容放入 init.el 文件中:

(add-to-list 'load-path "~/.emacs.d/dotemacs_git/smart-operator/")
(require 'smart-operator)
(smart-operator-mode 1)

这似乎没有自动打开智能运算符(operator)模式......我仍然需要这样做

M-x smart-operator-mode

让它工作。我究竟做错了什么?此设置here在 python-mode-hook 中使用 smart-operator-mode;不过,我不明白为什么在 python 模式下以函数调用为条件会很重要......

谢谢

迈克

最佳答案

您提供的链接显示人们使用

(smart-operator-mode-on)

此外,他们还在 Hook 中添加了该调用,如下所示:

(add-hook 'python-mode-hook
          (lambda ()
              (smart-operator-mode-on)))

这将使用python-mode为所有缓冲区打开它。您需要它,因为 smart-operator-mode 似乎不是 global minor mode .

关于emacs - smart-operator.el 不自动加载...什么给出了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4038533/

相关文章:

emacs - 评估绑定(bind)到 emacs 中的键的函数时出现错误类型错误

emacs - 如何在emacs中使用向后删除单词而不是向后杀死单词

emacs - Emacs 中的子字/ transient 标记突出显示问题

shell - 自定义 shell 自动从 .emacs 启动

git - 如何在 Emacs 缓冲区中执行 git 提交

emacs - 使用 GNU Emacs 打开已打开的文件

java - 使用 el-get 安装 ensime 失败

elisp - 需要 compile-goto-error 变体来替换当前窗口中的编译缓冲区

emacs - 等待 comint 模式缓冲区

ruby - 用于构建列表的 elisp 数据结构/工作流程