mirror of
https://github.com/correl/melpa.git
synced 2024-12-18 11:06:10 +00:00
add elisp package for melpa
fixes bugs and extends functionality
This commit is contained in:
parent
344d8148f8
commit
44c6fc8c58
1 changed files with 72 additions and 0 deletions
72
melpa.el
Normal file
72
melpa.el
Normal file
|
@ -0,0 +1,72 @@
|
|||
;;; melpa.el --- special handling for the MELPA repository
|
||||
;;
|
||||
;; Copyright 2012 Donald Ephraim Curtis
|
||||
;;
|
||||
;; Author: Donald Ephraim Curtis <dcurtis@milkbox.net>
|
||||
;; URL: https://github.com/milkypostman/melpa
|
||||
;; Version: 0.1
|
||||
|
||||
;; Code goes here
|
||||
;;
|
||||
|
||||
;;;###autoload
|
||||
(defcustom melpa-package-enable nil
|
||||
"Exclusive list of package symbols enabled for MELPA versions.
|
||||
Empty list enables all packages."
|
||||
:group 'melpa
|
||||
:type '(repeat symbol))
|
||||
|
||||
;;;###autoload
|
||||
(defcustom melpa-package-exclude nil
|
||||
"List of package symbols excluded from the MELPA repo.
|
||||
Trumps `melpa-package-enable'."
|
||||
:group 'melpa
|
||||
:type '(repeat symbol))
|
||||
|
||||
;;;###autoload
|
||||
(defadvice package-compute-transaction
|
||||
(before
|
||||
package-compute-transaction-reverse (package-list requirements)
|
||||
activate compile)
|
||||
"reverse the requirements"
|
||||
(setq requirements (reverse requirements))
|
||||
(print requirements))
|
||||
|
||||
;;;###autoload
|
||||
(defadvice package-download-tar
|
||||
(after package-download-tar-initialize activate compile)
|
||||
"initialize the package after compilation"
|
||||
(package-initialize))
|
||||
|
||||
;;;###autoload
|
||||
(defadvice package-download-single
|
||||
(after package-download-single-initialize activate compile)
|
||||
"initialize the package after compilation"
|
||||
(package-initialize))
|
||||
|
||||
;;;###autoload
|
||||
(defadvice package--add-to-archive-contents
|
||||
(around melpa--add-to-archive-contents (package archive) activate compile)
|
||||
"For the `melpa' archive:
|
||||
|
||||
Ignore any packages in `melpa-package-exclude'.
|
||||
|
||||
If `melpa-package-enable' is nil, accept any packages from the
|
||||
`melpa' archive, otherwise only accpet packages given in
|
||||
`melpa-package-enable'.
|
||||
|
||||
Both `melpa-package-enable' and `melpa-package-exclude' are lists
|
||||
of symbolp."
|
||||
;; (message (symbol-name (car package)))
|
||||
(when (or (not (equal archive "melpa"))
|
||||
(and
|
||||
(not (memq (car package) melpa-package-exclude))
|
||||
(or (not melpa-package-enable)
|
||||
(memq (car package) melpa-package-enable))))
|
||||
ad-do-it))
|
||||
|
||||
|
||||
|
||||
(provide 'melpa)
|
||||
|
||||
;;; melpa.el ends here
|
Loading…
Reference in a new issue