设置使用eval-after-load和使用模式挂钩的模式之间有区别吗?
我已经看到一些代码在define-key主模式钩子中使用,而其他一些代码define-key在eval-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组织模式文件中,当我单击PDF时,文件将在PDF查看器中打开.同样,当我点击一个URL时,它会在Web浏览器中打开.但是,当我单击图像文件的路径时,字节流将在编辑器中以文本形式打开.如何配置Emacs/org-mode以使用指定的应用程序(例如图像编辑器或浏览器)打开图像?