From 1a39b19911428fedd6f81071347d5165fde01e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Tue, 12 Jun 2018 00:31:54 +0200 Subject: [PATCH] app-emacs/editorconfig-emacs: Update site-init file. Follow Emacs project standards, i.e., don't activate features as site default but leave this to the user. Commit with permission of zmedico in #gentoo-dev. Package-Manager: Portage-2.3.40, Repoman-2.3.9 --- ...ild => editorconfig-emacs-0.7.8-r1.ebuild} | 22 +++++++------------ .../files/50editorconfig-emacs-gentoo.el | 7 ++++++ app-emacs/editorconfig-emacs/metadata.xml | 5 +++++ 3 files changed, 20 insertions(+), 14 deletions(-) rename app-emacs/editorconfig-emacs/{editorconfig-emacs-0.7.8.ebuild => editorconfig-emacs-0.7.8-r1.ebuild} (54%) create mode 100644 app-emacs/editorconfig-emacs/files/50editorconfig-emacs-gentoo.el diff --git a/app-emacs/editorconfig-emacs/editorconfig-emacs-0.7.8.ebuild b/app-emacs/editorconfig-emacs/editorconfig-emacs-0.7.8-r1.ebuild similarity index 54% rename from app-emacs/editorconfig-emacs/editorconfig-emacs-0.7.8.ebuild rename to app-emacs/editorconfig-emacs/editorconfig-emacs-0.7.8-r1.ebuild index 8b6ace3612d80..f79186d032e1d 100644 --- a/app-emacs/editorconfig-emacs/editorconfig-emacs-0.7.8.ebuild +++ b/app-emacs/editorconfig-emacs/editorconfig-emacs-0.7.8-r1.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -inherit elisp +inherit elisp readme.gentoo-r1 DESCRIPTION="EditorConfig plugin for emacs" HOMEPAGE="https://github.com/editorconfig/editorconfig-emacs" @@ -12,16 +12,10 @@ SRC_URI="https://github.com/editorconfig/${PN}/archive/v${PV}.tar.gz -> ${P}.tar LICENSE="GPL-3+" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" -RESTRICT="test" +RESTRICT="test" # make test requires a git repo -src_install() { - local site_file="${T}/50${PN}-gentoo.el" - echo " -(require 'editorconfig) -(editorconfig-mode 1) -" > "${site_file}" || die - elisp-site-file-install "${site_file}" - elisp_src_install - dodoc README.md -} +SITEFILE="50${PN}-gentoo.el" +DOCS="README.md" +DOC_CONTENTS="The EditorConfig feature is not enabled as a site default. + Add the following line to your ~/.emacs file to activate it: + \n\t(editorconfig-mode 1)" diff --git a/app-emacs/editorconfig-emacs/files/50editorconfig-emacs-gentoo.el b/app-emacs/editorconfig-emacs/files/50editorconfig-emacs-gentoo.el new file mode 100644 index 0000000000000..93d6816e8e7b0 --- /dev/null +++ b/app-emacs/editorconfig-emacs/files/50editorconfig-emacs-gentoo.el @@ -0,0 +1,7 @@ +(add-to-list 'load-path "@SITELISP@") +(autoload 'editorconfig-mode "editorconfig" + "Toggle EditorConfig feature." t) +(autoload 'editorconfig-conf-mode "editorconfig-conf-mode" + "Major mode for editing .editorconfig files." t) +(add-to-list 'auto-mode-alist + '("/\\.editorconfig\\'" . editorconfig-conf-mode)) diff --git a/app-emacs/editorconfig-emacs/metadata.xml b/app-emacs/editorconfig-emacs/metadata.xml index 14acb12060ddf..65f408f2b6bf7 100644 --- a/app-emacs/editorconfig-emacs/metadata.xml +++ b/app-emacs/editorconfig-emacs/metadata.xml @@ -7,4 +7,9 @@ zmedico@gentoo.org + + gnu-emacs@gentoo.org + Gentoo GNU Emacs project + +