Emacs で elpa を使用していくつかのパッケージをインストールしましたが、Emacs の起動時にどのようにロードされますか?
1 に答える
0
package-install
の一部ですpackage.el
-- で見ることができますdescribe-function
。package.el
ドキュメントから:
;; At activation time we will set up the load-path and the info path,
;; and we will load the package's autoloads. If a package's
;; dependencies are not available, we will not activate that package.
したがって、すべてのパッケージにはファイルがあります
NAME-autoloads.el
このファイルは起動時にロードされます。
パッケージ全体は、以下に含まれていpackage-user-dir
ます。
(setq package-user-dir "~/.emacs.d/site-lisp/package-install")
(require 'package)
各パッケージにはNAME-pkg.el
、パッケージのバージョンと説明も含まれています。たとえば、tabbar
パッケージに関連するファイルは次のとおりです。
package-install # that's my package-user-dir
└── tabbar-2.0.1 # each package dir is in the separate dir
├── tabbar-autoloads.el # this file is loaded at start up
├── tabbar.el # the package itself. In this case it is just a single file
└── tabbar-pkg.el # information about the package for package managment
マニュアルを引用するには: 39.1.1 概要: 起動時のアクションのシーケンス:
15. package-enable-at-startup が非 nil の場合、関数 package-initialize を呼び出して、インストールされている任意の Emacs Lisp パッケージをアクティブにします。
package-initialize
次に、 が呼び出さpackage-activate
れ、その後、 が呼び出され、これが loadpackage-activate-1
で終了しNAME-autoload.el
ます:
(load (expand-file-name (concat name "-autoloads") pkg-dir) nil t)
于 2014-04-26T04:55:42.910 に答える