1 |
ulm 09/04/14 15:45:45 |
2 |
|
3 |
Modified: elisp-common.eclass |
4 |
Log: |
5 |
Sync from Emacs overlay (revision 1379). |
6 |
|
7 |
Remove all code in elisp-site-regen related to site-start.el; it is |
8 |
now installed by emacs-common-gentoo. Suppress error message in |
9 |
elisp-site-file-install if cp source and destination are identical. |
10 |
|
11 |
Revision Changes Path |
12 |
1.60 eclass/elisp-common.eclass |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.60&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.60&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?r1=1.59&r2=1.60 |
17 |
|
18 |
Index: elisp-common.eclass |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v |
21 |
retrieving revision 1.59 |
22 |
retrieving revision 1.60 |
23 |
diff -u -r1.59 -r1.60 |
24 |
--- elisp-common.eclass 8 Apr 2009 10:47:42 -0000 1.59 |
25 |
+++ elisp-common.eclass 14 Apr 2009 15:45:45 -0000 1.60 |
26 |
@@ -1,6 +1,6 @@ |
27 |
# Copyright 1999-2009 Gentoo Foundation |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.59 2009/04/08 10:47:42 ulm Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.60 2009/04/14 15:45:45 ulm Exp $ |
31 |
# |
32 |
# Copyright 2002-2004 Matthew Kennedy <mkennedy@g.o> |
33 |
# Copyright 2003 Jeremy Maitin-Shepard <jbms@×××××.com> |
34 |
@@ -260,7 +260,7 @@ |
35 |
|| ewarn "elisp-site-file-install: bad name of site-init file" |
36 |
sf="${T}/${sf/%-gentoo*.el/-gentoo.el}" |
37 |
ebegin "Installing site initialisation file for GNU Emacs" |
38 |
- cp "$1" "${sf}" |
39 |
+ [[ $1 = ${sf} ]] || cp "$1" "${sf}" |
40 |
sed -i -e "1{:x;/^\$/{n;bx;};/^;.*${PN}/I!s:^:${header}\n\n:;1s:^:\n:;}" \ |
41 |
-e "s:@SITELISP@:${SITELISP}/${my_pn}:g" \ |
42 |
-e "s:@SITEETC@:${SITEETC}/${my_pn}:g;\$q" "${sf}" |
43 |
@@ -284,7 +284,7 @@ |
44 |
# location is still supported when generating site-gentoo.el. |
45 |
|
46 |
elisp-site-regen() { |
47 |
- local i sf line firstrun obsolete |
48 |
+ local i sf line obsolete |
49 |
local -a sflist |
50 |
|
51 |
if [ ! -d "${ROOT}${SITELISP}" ]; then |
52 |
@@ -297,28 +297,7 @@ |
53 |
return 1 |
54 |
fi |
55 |
|
56 |
- [ -e "${ROOT}${SITELISP}"/site-gentoo.el ] \ |
57 |
- || [ "${PN}" = emacs-common-gentoo ] || firstrun=t |
58 |
- |
59 |
- if [ "${firstrun}" ] && [ ! -e "${ROOT}${SITELISP}"/site-start.el ]; then |
60 |
- einfo "Creating default site-start.el ..." |
61 |
- cat <<-EOF >"${T}"/site-start.el |
62 |
- ;;; site-start.el |
63 |
- |
64 |
- ;;; Commentary: |
65 |
- ;; This default site startup file is installed by elisp-common.eclass. |
66 |
- ;; You may replace this file by your own site initialisation, or even |
67 |
- ;; remove it completely; it will not be recreated. |
68 |
- |
69 |
- ;;; Code: |
70 |
- ;; Load site initialisation for Gentoo-installed packages. |
71 |
- (require 'site-gentoo) |
72 |
- |
73 |
- ;;; site-start.el ends here |
74 |
- EOF |
75 |
- fi |
76 |
- |
77 |
- einfon "Regenerating site-gentoo.el (${EBUILD_PHASE}) ..." |
78 |
+ einfon "Regenerating site-gentoo.el for GNU Emacs (${EBUILD_PHASE}) ..." |
79 |
|
80 |
# Until January 2009, elisp-common.eclass sometimes created an |
81 |
# auxiliary file for backwards compatibility. Remove any such file. |
82 |
@@ -373,34 +352,10 @@ |
83 |
echo " no changes." |
84 |
else |
85 |
mv "${T}"/site-gentoo.el "${ROOT}${SITELISP}"/site-gentoo.el |
86 |
- [ -f "${T}"/site-start.el ] \ |
87 |
- && [ ! -e "${ROOT}${SITELISP}"/site-start.el ] \ |
88 |
- && mv "${T}"/site-start.el "${ROOT}${SITELISP}"/site-start.el |
89 |
echo |
90 |
einfo "... ${#sflist[@]} site initialisation file(s) included." |
91 |
fi |
92 |
|
93 |
- if [ "${firstrun}" ]; then |
94 |
- echo |
95 |
- while read line; do einfo "${line:- }"; done <<-EOF |
96 |
- All site initialisation for Gentoo-installed packages is added to |
97 |
- /usr/share/emacs/site-lisp/site-gentoo.el; site-start.el is not |
98 |
- managed by Gentoo. You are responsible for all maintenance of |
99 |
- site-start.el if there is such a file. |
100 |
- |
101 |
- In order for this site initialisation to be loaded for all users |
102 |
- automatically, you can add a line like this: |
103 |
- |
104 |
- (require 'site-gentoo) |
105 |
- |
106 |
- to /usr/share/emacs/site-lisp/site-start.el. Alternatively, that line |
107 |
- can be added by individual users to their initialisation files, or, |
108 |
- for greater flexibility, users can load individual package-specific |
109 |
- initialisation files from /usr/share/emacs/site-lisp/site-gentoo.d/. |
110 |
- EOF |
111 |
- echo |
112 |
- fi |
113 |
- |
114 |
if [ "${obsolete}" ]; then |
115 |
echo |
116 |
while read line; do ewarn "${line}"; done <<-EOF |
117 |
@@ -412,7 +367,7 @@ |
118 |
fi |
119 |
|
120 |
# cleanup |
121 |
- rm -f "${T}"/site-{gentoo,start}.el |
122 |
+ rm -f "${T}"/site-gentoo.el |
123 |
|
124 |
return 0 |
125 |
} |