Skip to content

Commit

Permalink
app-emacs/editorconfig-emacs: Update site-init file.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ulm committed Jun 11, 2018
1 parent 7d7ff6f commit 1a39b19
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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)"
Original file line number Diff line number Diff line change
@@ -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))
5 changes: 5 additions & 0 deletions app-emacs/editorconfig-emacs/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@
<maintainer type="person">
<email>[email protected]</email>
</maintainer>
<maintainer type="project">
<email>[email protected]</email>
<name>Gentoo GNU Emacs project</name>
</maintainer>
<stabilize-allarches/>
</pkgmetadata>

0 comments on commit 1a39b19

Please sign in to comment.