Mercurial > hg > xemacs-beta
diff 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 |
line wrap: on
line diff
--- a/lisp/custom/cus-load.el Mon Aug 13 10:02:48 2007 +0200 +++ b/lisp/custom/cus-load.el Mon Aug 13 10:03:52 2007 +0200 @@ -35,19 +35,35 @@ (require 'custom) -(defun custom-put (symbol property list) - (let ((loads (get symbol property))) + +(defun custom-add-loads (symbol list) + "Update the custom-loads list of a symbol. +This works by adding the elements from LIST to the SYMBOL's +`custom-loads' property, avoiding duplicates. Also, SYMBOL is +added to `custom-group-hash-table'." + (let ((loads (get symbol 'custom-loads))) (dolist (el list) (unless (member el loads) (setq loads (nconc loads (list el))))) - (put symbol property loads) + (put symbol 'custom-loads loads) (puthash symbol t custom-group-hash-table))) +;; custom-add-loads was named custom-put (and accepted different +;; arguments) during the 20.3 beta cycle. Support it for +;; compatibility. +(defun custom-put (symbol ignored list) + (custom-add-loads symbol list)) +(make-obsolete 'custom-put 'custom-add-loads) + + (message "Loading customization dependencies...") -(mapc (lambda (dir) - (load (expand-file-name "custom-load" dir) t t)) - load-path) +;; Garbage-collection seems to be very intensive here, and it slows +;; things down. Nuke it. +(let ((gc-cons-threshold 10000000)) + (mapc (lambda (dir) + (load (expand-file-name "custom-load" dir) t t)) + load-path)) (message "Loading customization dependencies...done")