Mercurial > hg > xemacs-beta
comparison lisp/custom/cus-load.el @ 207:e45d5e7c476e r20-4b2
Import from CVS: tag r20-4b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:03:52 +0200 |
parents | a2f645c6b9f8 |
children |
comparison
equal
deleted
inserted
replaced
206:d3e9274cbc4e | 207:e45d5e7c476e |
---|---|
33 | 33 |
34 ;;; Code: | 34 ;;; Code: |
35 | 35 |
36 (require 'custom) | 36 (require 'custom) |
37 | 37 |
38 (defun custom-put (symbol property list) | 38 |
39 (let ((loads (get symbol property))) | 39 (defun custom-add-loads (symbol list) |
40 "Update the custom-loads list of a symbol. | |
41 This works by adding the elements from LIST to the SYMBOL's | |
42 `custom-loads' property, avoiding duplicates. Also, SYMBOL is | |
43 added to `custom-group-hash-table'." | |
44 (let ((loads (get symbol 'custom-loads))) | |
40 (dolist (el list) | 45 (dolist (el list) |
41 (unless (member el loads) | 46 (unless (member el loads) |
42 (setq loads (nconc loads (list el))))) | 47 (setq loads (nconc loads (list el))))) |
43 (put symbol property loads) | 48 (put symbol 'custom-loads loads) |
44 (puthash symbol t custom-group-hash-table))) | 49 (puthash symbol t custom-group-hash-table))) |
50 | |
51 ;; custom-add-loads was named custom-put (and accepted different | |
52 ;; arguments) during the 20.3 beta cycle. Support it for | |
53 ;; compatibility. | |
54 (defun custom-put (symbol ignored list) | |
55 (custom-add-loads symbol list)) | |
56 (make-obsolete 'custom-put 'custom-add-loads) | |
57 | |
45 | 58 |
46 (message "Loading customization dependencies...") | 59 (message "Loading customization dependencies...") |
47 | 60 |
48 (mapc (lambda (dir) | 61 ;; Garbage-collection seems to be very intensive here, and it slows |
49 (load (expand-file-name "custom-load" dir) t t)) | 62 ;; things down. Nuke it. |
50 load-path) | 63 (let ((gc-cons-threshold 10000000)) |
64 (mapc (lambda (dir) | |
65 (load (expand-file-name "custom-load" dir) t t)) | |
66 load-path)) | |
51 | 67 |
52 (message "Loading customization dependencies...done") | 68 (message "Loading customization dependencies...done") |
53 | 69 |
54 (provide 'cus-load) | 70 (provide 'cus-load) |
55 | 71 |