annotate lisp/custom/cus-load.el @ 195:a2f645c6b9f8 r20-3b24

Import from CVS: tag r20-3b24
author cvs
date Mon, 13 Aug 2007 09:59:05 +0200
parents
children e45d5e7c476e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
195
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
1 ;;; cus-load.el --- Batch load all available cus-load files
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
2
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
3 ;; Copyright (C) 1997 by Free Software Foundation, Inc.
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
4
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
5 ;; Author: Steven L Baur <steve@altair.xemacs.org>
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
6 ;; Keywords: internal, help, faces
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
7
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
8 ;; This file is part of XEmacs.
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
9
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
10 ;; XEmacs is free software; you can redistribute it and/or modify it
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
11 ;; under the terms of the GNU General Public License as published by
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
13 ;; any later version.
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
14
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
15 ;; XEmacs is distributed in the hope that it will be useful, but
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
18 ;; General Public License for more details.
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
19
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
23 ;; 02111-1307, USA.
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
24
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
25 ;;; Synched up with: Not in FSF
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
26
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
27 ;;; Commentary:
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
28
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
29 ;; In FSF all of the custom loads are in a single `cus-load' file.
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
30 ;; However, we have them distributed across directories, with optional
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
31 ;; incremental loading. Here we simply collect the whole set.
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
32
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
33
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
34 ;;; Code:
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
35
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
36 (require 'custom)
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
37
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
38 (defun custom-put (symbol property list)
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
39 (let ((loads (get symbol property)))
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
40 (dolist (el list)
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
41 (unless (member el loads)
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
42 (setq loads (nconc loads (list el)))))
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
43 (put symbol property loads)
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
44 (puthash symbol t custom-group-hash-table)))
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
45
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
46 (message "Loading customization dependencies...")
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
47
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
48 (mapc (lambda (dir)
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
49 (load (expand-file-name "custom-load" dir) t t))
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
50 load-path)
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
51
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
52 (message "Loading customization dependencies...done")
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
53
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
54 (provide 'cus-load)
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
55
a2f645c6b9f8 Import from CVS: tag r20-3b24
cvs
parents:
diff changeset
56 ;;; cus-load.el ends here