Mercurial > dotfiles
diff .elisp/settings/00.bootstrap.el @ 336:ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
I've been toting around this package.el from 2009 or so, and something
in the package format seems to have changed that broke me. Thanks to
some related diagnostics by Lucas, I've grabbed the last package.el
that worked with emacs 23 and stashed it here. This seems to work,
modulo some things (notably js2-mode and smex) now seem to require
emacs 24 if you install them using package.el, so this will end up
being brittle on my last couple of emacs23 machines.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Thu, 29 May 2014 14:30:42 -0400 |
parents | 4f49d70f1b69 |
children | 7e97572ac429 |
line wrap: on
line diff
--- a/.elisp/settings/00.bootstrap.el +++ b/.elisp/settings/00.bootstrap.el @@ -1,7 +1,19 @@ ;; emacs -l .elisp/settings/00.bootstrap.el --batch -f af-bootstrap-packages ;; Use the above for moving into a new machine (add-to-list 'load-path (expand-file-name "~/.elisp")) -(load "package") + +;; emacs 23 compat hack from Lucas Bergman +(unless (fboundp 'package-refresh-contents) + ;; If ELPA support isn't built in, we're in Emacs <=23. Normally, one + ;; would bootstrap ELPA from the source, tromey.com, but that sucks, + ;; because that version of package.el doesn't support multiple archives + ;; even in 2012. old/package.el is from http://bit.ly/pkg-el23, which is + ;; cited at https://github.com/technomancy/package.el as the last emacs23 + ;; version of package.el. + (unless (load (expand-file-name "~/.elisp/old/package.el")) + (error "ELPA is not in Emacs, and local package.el failed to load."))) + + (package-initialize) (setq package-archives '(("durin42" . "http://durin42.com/elpa/") @@ -17,9 +29,12 @@ http-twiddle ipython nose + ;; disabled until I don't need a modified version ;; textmate + iedit + ;; from elpa js2-mode magit