1 |
ulm 08/08/27 06:53:42 |
2 |
|
3 |
Modified: elisp-common.eclass |
4 |
Log: |
5 |
Sync eclasses from Emacs overlay (revision 1137). |
6 |
|
7 |
elisp-common.eclass: |
8 |
Add current directory to load-path in elisp-compile. |
9 |
New variable BYTECOMPFLAGS. |
10 |
Document EMACS and EMACSFLAGS as eclass variables. |
11 |
|
12 |
Revision Changes Path |
13 |
1.43 eclass/elisp-common.eclass |
14 |
|
15 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.43&view=markup |
16 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.43&content-type=text/plain |
17 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?r1=1.42&r2=1.43 |
18 |
|
19 |
Index: elisp-common.eclass |
20 |
=================================================================== |
21 |
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v |
22 |
retrieving revision 1.42 |
23 |
retrieving revision 1.43 |
24 |
diff -u -r1.42 -r1.43 |
25 |
--- elisp-common.eclass 10 Aug 2008 16:54:22 -0000 1.42 |
26 |
+++ elisp-common.eclass 27 Aug 2008 06:53:41 -0000 1.43 |
27 |
@@ -1,6 +1,6 @@ |
28 |
# Copyright 1999-2008 Gentoo Foundation |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.42 2008/08/10 16:54:22 ulm Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.43 2008/08/27 06:53:41 ulm Exp $ |
32 |
# |
33 |
# Copyright 2002-2004 Matthew Kennedy <mkennedy@g.o> |
34 |
# Copyright 2003 Jeremy Maitin-Shepard <jbms@×××××.com> |
35 |
@@ -33,20 +33,20 @@ |
36 |
# src_compile() usage: |
37 |
# |
38 |
# An elisp file is compiled by the elisp-compile() function defined here and |
39 |
-# simply takes the source files as arguments. |
40 |
+# simply takes the source files as arguments. The case of interdependent |
41 |
+# elisp files is also supported, since the current directory is added to the |
42 |
+# load-path which makes sure that all files are loadable. |
43 |
# |
44 |
# elisp-compile *.el || die "elisp-compile failed" |
45 |
# |
46 |
-# In the case of interdependent elisp files, you can use the elisp-comp() |
47 |
-# function which makes sure all files are loadable. |
48 |
-# |
49 |
-# elisp-comp *.el || die "elisp-comp failed" |
50 |
+# Formerly, function elisp-comp() was used for compilation of interdependent |
51 |
+# elisp files. This usage is considered as obsolete. |
52 |
# |
53 |
# Function elisp-make-autoload-file() can be used to generate a file with |
54 |
# autoload definitions for the lisp functions. It takes the output file name |
55 |
# (default: "${PN}-autoloads.el") and a list of directories (default: working |
56 |
# directory) as its arguments. Use of this function requires that the elisp |
57 |
-# source files contain magic ";;;###autoload" comments. See the Emacs Lisp |
58 |
+# source files contain magic ";;;###autoload" comments. See the Emacs Lisp |
59 |
# Reference Manual (node "Autoload") for a detailed explanation. |
60 |
# |
61 |
# .SS |
62 |
@@ -140,18 +140,38 @@ |
63 |
# Name of package's site-init file. |
64 |
SITEFILE=50${PN}-gentoo.el |
65 |
|
66 |
+# @ECLASS-VARIABLE: EMACS |
67 |
+# @DESCRIPTION: |
68 |
+# Path of Emacs executable. |
69 |
EMACS=/usr/bin/emacs |
70 |
-# The following works for Emacs versions 18-23, don't change it. |
71 |
+ |
72 |
+# @ECLASS-VARIABLE: EMACSFLAGS |
73 |
+# @DESCRIPTION: |
74 |
+# Flags for executing Emacs in batch mode. |
75 |
+# These work for Emacs versions 18-23, so don't change them. |
76 |
EMACSFLAGS="-batch -q --no-site-file" |
77 |
|
78 |
+# @ECLASS-VARIABLE: BYTECOMPFLAGS |
79 |
+# @DESCRIPTION: |
80 |
+# Emacs flags used for byte-compilation in elisp-compile(). |
81 |
+BYTECOMPFLAGS="-L ." |
82 |
+ |
83 |
# @FUNCTION: elisp-compile |
84 |
# @USAGE: <list of elisp files> |
85 |
# @DESCRIPTION: |
86 |
# Byte-compile Emacs Lisp files. |
87 |
+# |
88 |
+# This function uses GNU Emacs to byte-compile all ".el" specified by its |
89 |
+# arguments. The resulting byte-code (".elc") files are placed in the same |
90 |
+# directory as their corresponding source file. |
91 |
+# |
92 |
+# The current directory is added to the load-path. This will ensure that |
93 |
+# interdependent Emacs Lisp files are visible between themselves, in case |
94 |
+# they require or load one another. |
95 |
|
96 |
elisp-compile() { |
97 |
ebegin "Compiling GNU Emacs Elisp files" |
98 |
- ${EMACS} ${EMACSFLAGS} -f batch-byte-compile "$@" |
99 |
+ ${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} -f batch-byte-compile "$@" |
100 |
eend $? "batch-byte-compile failed" |
101 |
} |