Questions tagged «elpa»

4
Emacs 24:加载通过ELPA安装的软件包
我刚刚cmake-mode使用以下命令在Emacs 24中安装了该软件包: M-x package-install cmake-mode 我可以看到包:~/.emacs.d/elpa/cmake-mode-20110824,我可以使用指令在加载它Commentary:的部分~/.emacs.d/elpa/cmake-mode-20110824/cmake-mode.el: ;; Add this code to your .emacs file to use the mode: ;; ;; (setq load-path (cons (expand-file-name "/dir/with/cmake-mode") load-path)) ;; (require 'cmake-mode) ;; (setq auto-mode-alist ;; (append '(("CMakeLists\\.txt\\'" . cmake-mode) ;; ("\\.cmake\\'" . cmake-mode)) ;; auto-mode-alist)) 但这与ELPA的EmacsWiki页面上的用法说明矛盾: ...软件包在init.el加载后初始化。这意味着您不应该将特定于程序包的初始化放入您的init.el中。 我倾向于同意此说明,因为在~/.gnu-emacs文件中添加了以下行: (add-to-list 'load-path "~/.emacs.d/elpa/cmake-mode-20110824/") 是很难看的,如果我何时升级软件包,它会损坏。但是,如果没有这一行,我将无法使用cmake-mode。 …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.