From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id DC87B1381F3 for ; Thu, 18 Jul 2013 20:36:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6A926E0ADE; Thu, 18 Jul 2013 20:36:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B6B08E0B04 for ; Thu, 18 Jul 2013 20:36:35 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ADFCE33E121 for ; Thu, 18 Jul 2013 20:36:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 48FBFE5459 for ; Thu, 18 Jul 2013 20:36:33 +0000 (UTC) From: "Ulrich Mueller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Mueller" Message-ID: <1374179854.0914a69ece4ac510cacd7719a6d7a11de3a8a071.ulm@gentoo> Subject: [gentoo-commits] proj/emacs:master commit in: eclass/ X-VCS-Repository: proj/emacs X-VCS-Files: eclass/elisp-common.eclass X-VCS-Directories: eclass/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Mueller X-VCS-Revision: 0914a69ece4ac510cacd7719a6d7a11de3a8a071 X-VCS-Branch: master Date: Thu, 18 Jul 2013 20:36:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ed39ef2c-a786-4e24-8bec-6dd7a2b4a538 X-Archives-Hash: 73bceeff401618b4f73076dcffaed0f7 commit: 0914a69ece4ac510cacd7719a6d7a11de3a8a071 Author: Ulrich Müller gentoo org> AuthorDate: Thu Jul 18 20:37:34 2013 +0000 Commit: Ulrich Mueller gentoo org> CommitDate: Thu Jul 18 20:37:34 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs.git;a=commit;h=0914a69e Make elisp-emacs-version() more robust. --- eclass/elisp-common.eclass | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass index dcba57b..8f6a826 100644 --- a/eclass/elisp-common.eclass +++ b/eclass/elisp-common.eclass @@ -173,16 +173,27 @@ BYTECOMPFLAGS="-L ." # Output version of currently active Emacs. elisp-emacs-version() { - local ret + local version ret # The following will work for at least versions 18-24. echo "(princ emacs-version)" >"${T}"/emacs-version.el - ${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el + version=$( + # EMACS could be a microemacs variant that doesn't know our + # options and would hang in interactive mode. Redirecting stdin + # and unsetting TERM and DISPLAY will make most of them fail. + unset TERM DISPLAY + ${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el