Mercurial > hg > xemacs-beta
comparison lisp/site-load.el @ 26:441bb1e64a06 r19-15b96
Import from CVS: tag r19-15b96
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:51:32 +0200 |
parents | |
children | 1917ad0d78d7 cf808b4c4290 |
comparison
equal
deleted
inserted
replaced
25:383a494979f8 | 26:441bb1e64a06 |
---|---|
1 ;;; site-load.el --- Template file for site-wide XEmacs customization | |
2 | |
3 ;; Author: Steven L. Baur <steve@altair.xemacs.org> | |
4 ;; Keywords: internal | |
5 | |
6 ;; This file is part of XEmacs. | |
7 | |
8 ;;; Commentary: | |
9 | |
10 ;; This is a prototype site-load.el file. | |
11 ;; The site-load.el mechanism is provided so XEmacs installers can easily | |
12 ;; dump lisp packages with XEmacs that do not get dumped standardly. | |
13 | |
14 ;; The file `site-packages' if it exists should look something like: | |
15 ;; (setq site-load-packages '( | |
16 ;; "../lisp/modes/cc-mode" | |
17 ;; "../lisp/utils/redo" | |
18 ;; "../lisp/packages/scroll-in-place" | |
19 ;; ) | |
20 ;; ) | |
21 | |
22 ;; The first line and the last line must be exact. Each of the packages | |
23 ;; listed must be double quoted, have either an absolute path, or a relative | |
24 ;; to the build src directory path *and* be bytecompiled prior to the attempt | |
25 ;; to dump. | |
26 | |
27 ;; Because this is a trial implementation and the file is shared with | |
28 ;; make-docfiles, syntax is strict and unforgiving. So sue me. It | |
29 ;; is still better than the way it used to be. | |
30 | |
31 ;;; Code: | |
32 (defvar site-load-package-file "../lisp/site-packages" | |
33 "File name containing the list of extra packages to dump with XEmacs.") | |
34 (defvar site-load-packages nil | |
35 "A list of .elc files that should be dumped with XEmacs. | |
36 This variable should be set by `site-load-package-file'.") | |
37 | |
38 ;; Load site specific packages for dumping with the XEmacs binary. | |
39 (when (file-exists-p site-load-package-file) | |
40 (let ((file)) | |
41 (load site-load-package-file t t t) | |
42 ;; The `load-gc' macro is provided as a clue that a package is being loaded | |
43 ;; in preparation of being dumped into XEmacs. | |
44 (defmacro load-gc (file) | |
45 (list 'prog1 (list 'load file) '(garbage-collect))) | |
46 (message "Loading site-wide packages for dumping...") | |
47 (while site-load-packages | |
48 (setq file (car site-load-packages)) | |
49 (load-gc file) | |
50 (setq site-load-packages (cdr site-load-packages))) | |
51 (message "Loading site-wide packages for dumping...done") | |
52 (fmakunbound 'load-gc))) | |
53 | |
54 ;; This file is intended for end user additions. | |
55 ;; Put other initialization here, like setting of language-environment, etc. | |
56 ;; Perhaps this should really be in the site-init.el. | |
57 | |
58 ;;; site-load.el ends here |