- Find and load the correct package.el
This commit is contained in:
parent
db5f35a1ad
commit
d7d310a9ec
@ -1,3 +1,12 @@
|
|||||||
|
;;; Find and load the correct package.el
|
||||||
|
;; When switching between Emacs 23 and 24, we always use the bundled package.el in Emacs 24
|
||||||
|
(let ((package-el-site-lisp-dir
|
||||||
|
(expand-file-name "site-lisp/package" user-emacs-directory)))
|
||||||
|
(when (and (file-directory-p package-el-site-lisp-dir)
|
||||||
|
(> emacs-major-version 23))
|
||||||
|
(message "Removing local package.el from load-path to avoid shadowing bundled version")
|
||||||
|
(setq load-path (remove package-el-site-lisp-dir load-path))))
|
||||||
|
|
||||||
(require 'package)
|
(require 'package)
|
||||||
|
|
||||||
;; Repositories
|
;; Repositories
|
||||||
|
Loading…
x
Reference in New Issue
Block a user