mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-29 04:58:53 +08:00
ccca97f226
Since Emacs 27 the package cl is deprecated, the replacement is cl-lib, which is available since Emacs 24.3. This patch replaces cl by cl-lib and drops support for Emacs versions less than 24.3. Dropping older Emacsen is required, because cl-lib is a builtin starting from version 24.3 and doesn't need an extra package from ELPA. Testcases for past issues still contain cl. Most of them seem to be broken and need further investigation. This patch is tested with test/run-ert.sh, which outputs: Ran 10 tests, 10 results as expected, 0 unexpected (2021-01-30 13:24:54+0100, 0.672122 sec) 1 expected failures and manually by daily usage for a month now.
51 lines
1.7 KiB
EmacsLisp
51 lines
1.7 KiB
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.md file from the same distribution
|
|
|
|
(require 'cl-lib)
|
|
(require 'el-get-core)
|
|
(require 'el-get-recipes)
|
|
(require 'el-get-git)
|
|
(require 'el-get-github)
|
|
|
|
(defun el-get-emacsmirror-get-github-source (package)
|
|
"Return a github-type source equivalent to emacsmirror PACKAGE."
|
|
(cl-assert (equal (el-get-package-type package) 'emacsmirror) nil
|
|
"Need an emacsmirror package")
|
|
(append `(:type github
|
|
:pkgname ,(format "emacsmirror/%s" package))
|
|
(el-get-package-def package)))
|
|
|
|
;;
|
|
;; emacsmirror support
|
|
;;
|
|
(defun el-get-emacsmirror-clone (package url post-install-fun)
|
|
;; Override the package def with an equivalent github-type package,
|
|
;; then run the github method.
|
|
(let* ((package-github-source
|
|
(el-get-emacsmirror-get-github-source package))
|
|
(el-get-sources (cons package-github-source el-get-sources)))
|
|
(el-get-github-clone package url post-install-fun)))
|
|
|
|
(defun el-get-emacsmirror-guess-website (package)
|
|
(let* ((package-github-source
|
|
(el-get-emacsmirror-get-github-source package))
|
|
(el-get-sources (cons package-github-source el-get-sources)))
|
|
(el-get-github-guess-website package)))
|
|
|
|
(el-get-register-derived-method :emacsmirror :github
|
|
:install #'el-get-emacsmirror-clone
|
|
:guess-website #'el-get-emacsmirror-guess-website)
|
|
|
|
(provide 'el-get-emacsmirror)
|