- To add the snapshot package repository put this before the
- call to package-initialize
in
- your init.el
file.
+
+
To use the MELPA repository, you'll need an Emacs with
+ package.el
. Emacs 24 has package.el
+ bundled with it, and there's also
+ a version
+ you can use with Emacs 23.
(require 'package)
+
+ Enable installation of packages from MELPA by adding an entry
+ to package-archives
after (require
+ 'package)
and before the call
+ to package-initialize
in
+ your init.el
or .emacs
file:
+
+
+ (require 'package) ;; You might already have this line
(add-to-list 'package-archives
- '("melpa" . "http://melpa.org/packages/") t)
+ '("melpa" . "http://melpa.org/packages/") t)
+(when (< emacs-major-version 24)
+ ;; For important compatibility libraries like cl-lib
+ (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
+(package-initialize) ;; You might already have this line
- or to add the stable package repository, use this snippet:
+
+ or to add the stable package repository, use this instead
+ of "melpa"
:
+
(require 'package)
-(add-to-list 'package-archives
- '("melpa-stable" . "http://stable.melpa.org/packages/") t)
-
- In Emacs < 24, you'll also need to explicitly include the GNU
- ELPA archive, which provides important compatibility libraries like cl-lib
:
(when (< emacs-major-version 24)
- (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
+ (add-to-list 'package-archives
+ '("melpa-stable" . "http://stable.melpa.org/packages/") t)