el-get/methods/el-get-builtin.el

33 lines
978 B
EmacsLisp

;;; el-get --- Manage the external elisp bits and pieces you depend upon
;;
;; Copyright (C) 2010-2011 Dimitri Fontaine
;;
;; Author: Dimitri Fontaine <dim@tapoueh.org>
;; URL: http://www.emacswiki.org/emacs/el-get
;; GIT: https://github.com/dimitri/el-get
;; Licence: WTFPL, grab your copy here: http://sam.zoy.org/wtfpl/
;;
;; This file is NOT part of GNU Emacs.
;;
;; Install
;; Please see the README.asciidoc file from the same distribution
(require 'el-get-core)
(defcustom el-get-builtin-install-hook nil
"Hook run after 'installing' a builtin package."
:group 'el-get
:type 'hook)
(defun el-get-builtin-install (package url post-install-fun)
(let ((pdir (el-get-package-directory package)))
(unless (file-directory-p pdir)
(make-directory pdir))
(funcall post-install-fun package)))
(el-get-register-method
:builtin #'el-get-builtin-install #'el-get-builtin-install #'el-get-rmdir
#'el-get-builtin-install-hook)
(provide 'el-get-builtin)