- (insert "(custom-put-if-not '" (symbol-name symbol)
- " 'custom-version ")
- (prin1 version (current-buffer))
- (insert ")\n")
- (insert "(custom-put-if-not '" (symbol-name symbol))
- (insert " 'group-documentation ")
- (prin1 (get symbol 'group-documentation) (current-buffer))
- (insert ")\n")
- (when (get symbol 'custom-tag)
- (insert "(custom-put-if-not '" (symbol-name symbol))
- (insert " 'custom-tag ")
- (prin1 (get symbol 'custom-tag) (current-buffer))
- (insert ")\n"))
- ))))))
+ (push (list (symbol-name symbol)
+ (with-output-to-string (prin1 version))
+ (with-output-to-string
+ (prin1 (get symbol 'group-documentation)))
+ (if (get symbol 'custom-tag)
+ (with-output-to-string
+ (prin1 (get symbol 'custom-tag)))))
+ groups)))))))
+ (dolist (e (sort groups (lambda (e1 e2) (string< (car e1) (car e2)))))
+ (insert "(custom-put-if-not '" (car e) " 'custom-version '"
+ (nth 1 e) ")\n")
+ (insert "(custom-put-if-not '" (car e) " 'group-documentation "
+ (nth 2 e) ")\n")
+ (if (nth 3 e)
+ (insert "(custom-put-if-not '" (car e) " 'custom-tag "
+ (nth 3 e) ")\n")))