相关疑难解决方法(0)

eval-after-load与模式挂钩

设置使用eval-after-load和使用模式挂钩的模式之间有区别吗?

我已经看到一些代码在define-key主模式钩子中使用,而其他一些代码define-keyeval-after-load形式中使用.


更新:

为了更好地理解,下面是使用带有org-mode的eval-after-load和mode钩子的示例.该代码可以运行之前 (load "org")(require 'org)(package-initialize).

;; The following two lines of code set some org-mode options.
;; Usually, these can be outside (eval-after-load ...) and work.
;; In cases that doesn't work, try using setq-default or set-variable
;; and putting them in (eval-after-load ...), if the
;; doc for the variables don't say what to do.
;; Or use Customize interface.
(setq org-hide-leading-stars t) …
Run Code Online (Sandbox Code Playgroud)

emacs elisp

67
推荐指数
1
解决办法
1万
查看次数

标签 统计

elisp ×1

emacs ×1