Mercurial > hg > xemacs-beta
comparison lisp/cus-load.el @ 284:558f606b08ae r21-0b40
Import from CVS: tag r21-0b40
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:34:13 +0200 |
parents | 41ff10fd062f |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
283:fa3d41851a08 | 284:558f606b08ae |
---|---|
33 | 33 |
34 ;;; Code: | 34 ;;; Code: |
35 | 35 |
36 (require 'custom) | 36 (require 'custom) |
37 | 37 |
38 | |
39 (defun custom-add-loads (symbol list) | 38 (defun custom-add-loads (symbol list) |
40 "Update the custom-loads list of a symbol. | 39 "Update the custom-loads list of a symbol. |
41 This works by adding the elements from LIST to the SYMBOL's | 40 This works by adding the elements from LIST to the SYMBOL's |
42 `custom-loads' property, avoiding duplicates. Also, SYMBOL is | 41 `custom-loads' property, avoiding duplicates. Also, SYMBOL is |
43 added to `custom-group-hash-table'." | 42 added to `custom-group-hash-table'." |
46 (unless (member el loads) | 45 (unless (member el loads) |
47 (setq loads (nconc loads (list el))))) | 46 (setq loads (nconc loads (list el))))) |
48 (put symbol 'custom-loads loads) | 47 (put symbol 'custom-loads loads) |
49 (puthash symbol t custom-group-hash-table))) | 48 (puthash symbol t custom-group-hash-table))) |
50 | 49 |
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 | |
58 | |
59 (message "Loading customization dependencies...") | 50 (message "Loading customization dependencies...") |
60 | 51 |
61 ;; Garbage-collection seems to be very intensive here, and it slows | 52 ;; Garbage-collection seems to be very intensive here, and it slows |
62 ;; things down. Nuke it. | 53 ;; things down. Nuke it. |
63 (let ((gc-cons-threshold 10000000)) | 54 (let ((gc-cons-threshold most-positive-fixnum)) |
64 (mapc (lambda (dir) | 55 (mapc (lambda (dir) |
65 (load (expand-file-name "custom-load" dir) t t)) | 56 (load (expand-file-name "custom-load" dir) t t)) |
66 load-path)) | 57 load-path)) |
67 | 58 |
68 (message "Loading customization dependencies...done") | 59 (message "Loading customization dependencies...done") |