1 |
ulm 13/08/02 16:48:18 |
2 |
|
3 |
Modified: elisp-common.eclass ChangeLog |
4 |
Log: |
5 |
Sync from Emacs overlay: Make elisp-emacs-version() more robust. |
6 |
|
7 |
Revision Changes Path |
8 |
1.85 eclass/elisp-common.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?rev=1.85&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?rev=1.85&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?r1=1.84&r2=1.85 |
13 |
|
14 |
Index: elisp-common.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v |
17 |
retrieving revision 1.84 |
18 |
retrieving revision 1.85 |
19 |
diff -u -r1.84 -r1.85 |
20 |
--- elisp-common.eclass 16 Mar 2013 08:55:30 -0000 1.84 |
21 |
+++ elisp-common.eclass 2 Aug 2013 16:48:18 -0000 1.85 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2013 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.84 2013/03/16 08:55:30 ulm Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.85 2013/08/02 16:48:18 ulm Exp $ |
27 |
# |
28 |
# @ECLASS: elisp-common.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -173,16 +173,28 @@ |
31 |
# Output version of currently active Emacs. |
32 |
|
33 |
elisp-emacs-version() { |
34 |
- local ret |
35 |
+ local version ret |
36 |
# The following will work for at least versions 18-24. |
37 |
echo "(princ emacs-version)" >"${T}"/emacs-version.el |
38 |
- ${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el |
39 |
+ version=$( |
40 |
+ # EMACS could be a microemacs variant that ignores the -batch |
41 |
+ # option and would therefore hang, waiting for user interaction. |
42 |
+ # Redirecting stdin and unsetting TERM and DISPLAY will cause |
43 |
+ # most of them to exit with an error. |
44 |
+ unset TERM DISPLAY |
45 |
+ ${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el </dev/null |
46 |
+ ) |
47 |
ret=$? |
48 |
rm -f "${T}"/emacs-version.el |
49 |
if [[ ${ret} -ne 0 ]]; then |
50 |
eerror "elisp-emacs-version: Failed to run ${EMACS}" |
51 |
+ return ${ret} |
52 |
+ fi |
53 |
+ if [[ -z ${version} ]]; then |
54 |
+ eerror "elisp-emacs-version: Could not determine Emacs version" |
55 |
+ return 1 |
56 |
fi |
57 |
- return ${ret} |
58 |
+ echo "${version}" |
59 |
} |
60 |
|
61 |
# @FUNCTION: elisp-need-emacs |
62 |
|
63 |
|
64 |
|
65 |
1.913 eclass/ChangeLog |
66 |
|
67 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.913&view=markup |
68 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.913&content-type=text/plain |
69 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.912&r2=1.913 |
70 |
|
71 |
Index: ChangeLog |
72 |
=================================================================== |
73 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
74 |
retrieving revision 1.912 |
75 |
retrieving revision 1.913 |
76 |
diff -u -r1.912 -r1.913 |
77 |
--- ChangeLog 2 Aug 2013 15:41:17 -0000 1.912 |
78 |
+++ ChangeLog 2 Aug 2013 16:48:18 -0000 1.913 |
79 |
@@ -1,6 +1,9 @@ |
80 |
# ChangeLog for eclass directory |
81 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
82 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.912 2013/08/02 15:41:17 mgorny Exp $ |
83 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.913 2013/08/02 16:48:18 ulm Exp $ |
84 |
+ |
85 |
+ 02 Aug 2013; Ulrich Müller <ulm@g.o> elisp-common.eclass: |
86 |
+ Sync from Emacs overlay: Make elisp-emacs-version() more robust. |
87 |
|
88 |
02 Aug 2013; Michał Górny <mgorny@g.o> git.eclass: |
89 |
Mark git.eclass @DEAD. |