Mercurial > hg > xemacs-beta
annotate lisp/site-load.el @ 5290:e6508b64ee08
More permission consistency.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Mon, 14 Jun 2010 19:03:57 +0900 |
parents | 3ecd8885ac67 |
children | b9167d522a9a |
rev | line source |
---|---|
428 | 1 ;;; site-load.el --- Template file for site-wide XEmacs customization |
2 ;; Copyright (C) 1997 Free Software Foundation, Inc. | |
3 | |
4 ;; Author: Steven L. Baur <steve@xemacs.org> | |
5 ;; Keywords: internal | |
6 | |
7 ;; This file is part of XEmacs. | |
8 | |
5290
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
9 ;; XEmacs is free software; you can redistribute it and/or modify it |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
10 ;; under the terms of the GNU General Public License as published by |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
11 ;; the Free Software Foundation; either version 2, or (at your option) |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
12 ;; any later version. |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
13 |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
14 ;; XEmacs is distributed in the hope that it will be useful, but |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
15 ;; WITHOUT ANY WARRANTY; without even the implied warranty of |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
17 ;; General Public License for more details. |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
18 |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
19 ;; You should have received a copy of the GNU General Public License |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
20 ;; along with XEmacs; see the file COPYING. If not, write to the Free |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
21 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
22 ;; Boston, MA 02110-1301, USA. |
e6508b64ee08
More permission consistency.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
23 |
428 | 24 ;;; Commentary: |
25 | |
26 ;; This is a prototype site-load.el file. | |
27 ;; The site-load.el mechanism is provided so XEmacs installers can easily | |
28 ;; dump lisp packages with XEmacs that do not get dumped standardly. | |
29 | |
30 ;; The file `site-packages' if it exists should look something like: | |
31 ;; (setq site-load-packages '( | |
32 ;; "../lisp/modes/cc-mode.elc" | |
33 ;; "../lisp/utils/redo.elc" | |
34 ;; "../lisp/packages/scroll-in-place.elc" | |
35 ;; ) | |
36 ;; ) | |
37 | |
38 ;; The first line and the last line must be exact. Each of the packages | |
39 ;; listed must be double quoted, have either an absolute path, or a relative | |
40 ;; to the build src directory path *and* be bytecompiled prior to the attempt | |
41 ;; to dump. They also must explicitly have the .elc extension. | |
42 | |
43 ;; Because this is a trial implementation and the file is shared with | |
44 ;; make-docfiles, syntax is strict and unforgiving. So sue me. It | |
45 ;; is still better than the way it used to be. | |
46 | |
47 ;; Also note that site-packages belongs in the top level directory not the | |
48 ;; lisp directory for use with --srcdir configurations. | |
49 | |
50 ;;; Code: | |
51 (defvar site-load-package-file "../site-packages" | |
52 "File name containing the list of extra packages to dump with XEmacs.") | |
53 (defvar site-load-packages nil | |
54 "A list of .elc files that should be dumped with XEmacs. | |
55 This variable should be set by `site-load-package-file'.") | |
56 | |
57 ;; Load site specific packages for dumping with the XEmacs binary. | |
58 (when (file-exists-p site-load-package-file) | |
59 (let ((file)) | |
60 (load site-load-package-file t t t) | |
61 ;; The `pureload' macro is provided as a clue that a package is | |
62 ;; being loaded in preparation of being dumped into XEmacs. | |
63 (defmacro pureload (file) | |
64 (list 'prog1 (list 'load file) '(garbage-collect))) | |
65 (message "Loading site-wide packages for dumping...") | |
66 (while site-load-packages | |
67 (setq file (car site-load-packages)) | |
68 (pureload file) | |
69 (setq site-load-packages (cdr site-load-packages))) | |
70 (message "Loading site-wide packages for dumping...done") | |
71 (fmakunbound 'pureload))) | |
72 | |
73 ;; This file is intended for end user additions. | |
74 ;; Put other initialization here, like setting of language-environment, etc. | |
75 ;; Perhaps this should really be in the site-init.el. | |
76 | |
77 ;;; site-load.el ends here |