summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/elisp-common.eclass')
-rw-r--r--eclass/elisp-common.eclass47
1 files changed, 27 insertions, 20 deletions
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
index b3b2dfe14cba..6aa42aad3a62 100644
--- a/eclass/elisp-common.eclass
+++ b/eclass/elisp-common.eclass
@@ -1,9 +1,10 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.23 2007/07/09 13:40:58 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.24 2007/07/10 20:14:52 ulm Exp $
#
# Copyright 2007 Christian Faulhammer <opfer@gentoo.org>
-# Copyright 2002-2007 Matthew Kennedy <mkennedy@gentoo.org>
+# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org>
+# Copyright 2004-2005 Mamoru Komachi <usata@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
# Copyright 2007 Ulrich Mueller <ulm@gentoo.org>
#
@@ -32,9 +33,9 @@
# elisp files, you can use the elisp-comp() function which makes sure all
# files are loadable.
#
-# elisp-compile *.el || die "elisp-compile failed!"
+# elisp-compile *.el || die "elisp-compile failed"
# or
-# elisp-comp *.el || die "elisp-comp failed!"
+# elisp-comp *.el || die "elisp-comp failed"
#
# Function elisp-make-autoload-file() can be used to generate a file with
# autoload definitions for the lisp functions. It takes the output file name
@@ -53,7 +54,7 @@
# something else, but remember to tell elisp-site-file-install() (see below)
# the change, as it defaults to ${PN}.
#
-# elisp-install ${PN} *.elc *.el || die "elisp-install failed!"
+# elisp-install ${PN} *.el *.elc || die "elisp-install failed"
#
# To let the Emacs support be activated by Emacs on startup, you need
# to provide a site file (shipped in ${FILESDIR}) which contains the startup
@@ -121,8 +122,6 @@
# As always: Feel free to contact Emacs team through emacs@gentoo.org if you
# have problems, suggestions or questions.
-IUSE="userland_GNU"
-
SITELISP=/usr/share/emacs/site-lisp
elisp-compile() {
@@ -189,11 +188,16 @@ elisp-site-regen() {
local sflist sf line
einfo "Regenerating ${SITELISP}/site-gentoo.el ..."
- cat <<EOF >"${T}"/site-gentoo.el
-;;; DO NOT EDIT THIS FILE -- IT IS GENERATED AUTOMATICALLY BY PORTAGE
-;;; -----------------------------------------------------------------
+ cat <<-EOF >"${T}"/site-gentoo.el
+ ;;; site-gentoo.el --- site initialisation for Gentoo-installed packages
+
+ ;;; Commentary:
+ ;; Automatically generated by elisp-common.eclass
+ ;; DO NOT EDIT THIS FILE
+
+ ;;; Code:
+ EOF
-EOF
for sf in "${ROOT}${SITELISP}"/[0-9][0-9]*-gentoo.el
do
[ -r "${sf}" ] || continue
@@ -201,42 +205,45 @@ EOF
cat "${sf}" >>"${T}"/site-gentoo.el
done
+ cat <<-EOF >>"${T}"/site-gentoo.el
+
+ ;;; site-gentoo.el ends here
+ EOF
+
if cmp -s "${ROOT}${SITELISP}"/site-gentoo.el "${T}"/site-gentoo.el; then
# This prevents outputting unnecessary text when there
# was actually no change
# A case is a remerge where we have doubled output
einfo "... no changes"
else
- local mvopts=""
- use userland_GNU && mvopts="-b"
- mv ${mvopts} "${T}"/site-gentoo.el "${ROOT}${SITELISP}"/site-gentoo.el
+ mv "${T}"/site-gentoo.el "${ROOT}${SITELISP}"/site-gentoo.el
einfo ""
for sf in ${sflist}; do
einfo " Adding ${sf} ..."
done
while read line; do einfo "${line}"; done <<EOF
-All site initialization for Gentoo-installed packages is now added to
+All site initialisation for Gentoo-installed packages is now added to
/usr/share/emacs/site-lisp/site-gentoo.el; site-start.el is no longer
managed by Gentoo. You are responsible for all maintenance of
site-start.el if there is such a file.
-In order for this site initialization to be loaded for all users
+In order for this site initialisation to be loaded for all users
automatically, as was done previously, you can add a line like this:
(load "/usr/share/emacs/site-lisp/site-gentoo" nil t)
to /usr/share/emacs/site-lisp/site-start.el. Alternatively, that line
-can be added by individual users to their initialization files, or for
+can be added by individual users to their initialisation files, or for
greater flexibility, users can select which of the package-specific
-initialization files in /usr/share/emacs/site-lisp to load.
+initialisation files in /usr/share/emacs/site-lisp to load.
EOF
echo
fi
}
-# The following Emacs Lisp compilation routine is taken from GNU
-# autotools.
+# The following Emacs Lisp compilation routine was originally taken from
+# GNU autotools.
elisp-comp() {
# Copyright 1995 Free Software Foundation, Inc.