From 50767c7e97bdd1cdadc516fd82fe583e54442100 Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Fri, 4 Jan 2013 21:22:43 +0000 Subject: Sync eclasses from Emacs overlay. elisp-common.eclass: Remove last remnants of backwards compatibility code from elisp-site-regen which was introduced at 2007-12-01. Distinguish between "version too low" and "could not determine version" in elisp_pkg_setup. elisp.eclass: Return 2 as exit status of elisp-need-emacs if the comparison could not be done, e.g., if emacs could not be executed. --- eclass/elisp-common.eclass | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'eclass/elisp-common.eclass') diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass index 3aa9e3f6165b..fb161050b531 100644 --- a/eclass/elisp-common.eclass +++ b/eclass/elisp-common.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.82 2012/09/01 09:39:07 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.83 2013/01/04 21:22:43 ulm Exp $ # # @ECLASS: elisp-common.eclass # @MAINTAINER: @@ -186,14 +186,14 @@ elisp-emacs-version() { # @FUNCTION: elisp-need-emacs # @USAGE: -# @RETURN: 0 if true, 1 otherwise +# @RETURN: 0 if true, 1 if false, 2 if trouble # @DESCRIPTION: # Test if the eselected Emacs version is at least the major version -# specified as argument. +# of GNU Emacs specified as argument. elisp-need-emacs() { local need_emacs=$1 have_emacs - have_emacs=$(elisp-emacs-version) || return + have_emacs=$(elisp-emacs-version) || return 2 einfo "Emacs version: ${have_emacs}" if [[ ${have_emacs} =~ XEmacs|Lucid ]]; then eerror "This package needs GNU Emacs." @@ -335,10 +335,6 @@ elisp-site-regen() { ebegin "Regenerating site-gentoo.el for GNU Emacs (${EBUILD_PHASE})" - # Until January 2009, elisp-common.eclass sometimes created an - # auxiliary file for backwards compatibility. Remove any such file. - rm -f "${sitelisp}"/00site-gentoo.el - for sf in "${sitelisp}"/[0-9][0-9]*-gentoo.el \ "${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el do -- cgit v1.2.3-65-gdbad