* lisp/cus-dep.el (custom-make-dependencies): Use it.
* lisp/custom.el (custom--add-custom-loads): New function.
(prin1 (sort found #'string<))))
alist))))))
(dolist (e (sort alist (lambda (e1 e2) (string< (car e1) (car e2)))))
- ;; Don't overwrite elements added by packages.
- (insert "(put '" (car e)
- " 'custom-loads (append '" (cdr e)
- " (get '" (car e) " 'custom-loads)))\n")))
+ (insert "(custom--add-custom-loads '" (car e) " '" (cdr e) ")\n")))
(insert "\
;; The remainder of this file is for handling :version.
(put variable 'custom-type
(append choices (list choice))))))
+(defun custom--add-custom-loads (symbol loads)
+ ;; Don't overwrite existing `custom-loads'.
+ (dolist (load (get symbol 'custom-loads))
+ (unless (memq load loads)
+ (push load loads)))
+ (put symbol 'custom-loads loads))
+
(provide 'custom)
;;; custom.el ends here