# 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"
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)"
--- /dev/null
+(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))
<maintainer type="person">
<email>zmedico@gentoo.org</email>
</maintainer>
+ <maintainer type="project">
+ <email>gnu-emacs@gentoo.org</email>
+ <name>Gentoo GNU Emacs project</name>
+ </maintainer>
+ <stabilize-allarches/>
</pkgmetadata>