]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove el-get support
authorPhilippe Vaucher <philippe.vaucher@gmail.com>
Tue, 5 Nov 2013 09:31:18 +0000 (10:31 +0100)
committerPhilippe Vaucher <philippe.vaucher@gmail.com>
Tue, 5 Nov 2013 09:32:21 +0000 (10:32 +0100)
lisp/use-package/use-package.el

index 704b0815238af632823c1296830a54e534930ec4..a6f19056820b491f445c2b88e8a769d90ddef9e0 100644 (file)
 ;;
 ;; (use-package tex-site
 ;;  :ensure auctex)
-;;
-;; * For el-get users
-;;
-;; You can use `use-package' as a way to create source definitions for el-get.
-;; All that's needed is to add a `:type' keyword to your declaration.  When
-;; this is present, certain keywords get translated to what el-get expects in
-;; the `el-get-sources' list:
-;;
-;;   :config   -> :after
-;;   :requires -> :depends
-;;
-;; A `:name' will be added also, if one is not provided explicitly, which will
-;; be the same as the name of the package.
-;;
-;; But why would you want to use `use-package' when you have el-get?  My
-;; answer is that I'd like to use el-get to install and update some packages,
-;; but I don't want it managing configuration.  Just loading el-get -- without
-;; call (el-get 'sync) -- takes a quarter second on my machine.  That's 25% of
-;; my load time!  `use-package' is designed for performance, so I only want to
-;; load el-get when it's time to install or update on of my used packages.
-;;
-;; Here is the `use-package' declaration I use for setting up el-get, but only
-;; when I want to install or update:
-;;
-;;   (defvar el-get-sources nil)
-;;
-;;   (use-package el-get
-;;     :commands (el-get
-;;                el-get-install
-;;                el-get-update
-;;                el-get-list-packages)
-;;     :config
-;;     (defun el-get-read-status-file ()
-;;       (mapcar #'(lambda (entry)
-;;                   (cons (plist-get entry :symbol)
-;;                         `(status "installed" recipe ,entry)))
-;;               el-get-sources)))
 \f
 ;;; Code:
 
 (require 'diminish nil t)
 
 (declare-function package-installed-p 'package)
-(declare-function el-get-read-recipe 'el-get)
 
 (defgroup use-package nil
   "A use-package declaration for simplifying your `.emacs'."
   :type 'boolean
   :group 'use-package)
 
-(defcustom use-package-debug nil
-  "Whether to report more information, mostly regarding el-get."
-  :type 'boolean
-  :group 'use-package)
-
 (defcustom use-package-minimum-reported-time 0.01
   "Minimal load time that will be reported"
   :type 'number
 
 (put 'with-elapsed-timer 'lisp-indent-function 1)
 
-(defun use-package-discover-el-get-type (args)
-  (let* ((pkg-name (plist-get args :name))
-         (git-config  (expand-file-name
-                       (concat pkg-name "/.git/config")
-                       (if (boundp 'user-site-lisp-directory)
-                           user-site-lisp-directory
-                         user-emacs-directory))))
-
-    (catch 'found
-      ;; Look for a readable .git/config with at least one defined remote.
-      (if (file-readable-p git-config)
-          (with-temp-buffer
-            (insert-file-contents-literally git-config)
-            (while (re-search-forward "\\[remote" nil t)
-              (if (re-search-forward "url = \\(.+\\)"
-                                     (save-excursion
-                                       (re-search-forward "\\[remote" nil t)
-                                       (point)) t)
-                  (nconc args (list :type 'git
-                                    :url (match-string 1))))))))
-    args))
-
 (defvar use-package-idle-timer nil)
 (defvar use-package-idle-forms nil)
 
@@ -603,43 +538,6 @@ For full documentation. please see commentary.
                  `(load ,name t)
                `(require ',name nil t))))
 
-         ,(when (boundp 'el-get-sources)
-            (require 'el-get)
-
-            (let ((recipe (ignore-errors
-                            (el-get-read-recipe name-symbol))))
-              (if (null recipe)
-                  (if use-package-debug
-                      (message "No el-get recipe found for package `%s'"
-                               name-symbol))
-                (setq args
-                      (mapcar #'(lambda (arg)
-                                  (cond
-                                   ((eq arg :config)
-                                    :after)
-                                   ((eq arg :requires)
-                                    :depends)
-                                   (t
-                                    arg)))
-                              args))
-
-                (nconc args (list :symbol (intern name-string)))
-
-                (let ((elem args))
-                  (while elem
-                    (unless (plist-get recipe (car elem))
-                      (plist-put recipe (car elem) (cadr elem)))
-                    (setq elem (cddr elem))))
-
-                (unless (plist-get recipe :name)
-                  (nconc recipe (list :name name-string)))
-
-                (unless (plist-get recipe :type)
-                  (setq recipe (use-package-discover-el-get-type recipe)))
-
-                (ignore
-                 (setq el-get-sources (cons recipe el-get-sources))))))
-
          ,(if (or commands (plist-get args :defer))
               (let (form)
                 (mapc #'(lambda (command)