In addition to the arguments of defxdoc,
Macro:
(defmacro defxdoc+ (&rest args) (b* ((name (car args)) (keyargs (cdr args)) ((unless (keyword-value-listp keyargs)) (cons 'with-output (cons ':gag-mode (cons 'nil (cons ':off (cons ':all (cons ':on (cons 'error (cons (cons 'make-event (cons (cons 'er (cons 'soft (cons ''defxdoc+ (cons '"Malformed keyed options: ~x0" (cons (cons 'quote (cons keyargs 'nil)) 'nil))))) '(:on-behalf-of :quiet!))) 'nil))))))))) (must-be-nil (set-difference-eq (evens keyargs) '(:parents :short :long :pkg :no-override :order-subtopics :default-parent))) ((when must-be-nil) (cons 'with-output (cons ':gag-mode (cons 'nil (cons ':off (cons ':all (cons ':on (cons 'error (cons (cons 'make-event (cons (cons 'er (cons 'soft (cons ''defxdoc+ (cons '"Unrecognized keyed option(s): ~x0" (cons (cons 'quote (cons must-be-nil 'nil)) 'nil))))) '(:on-behalf-of :quiet!))) 'nil))))))))) (parents (cadr (assoc-keyword :parents keyargs))) (short (cadr (assoc-keyword :short keyargs))) (long (cadr (assoc-keyword :long keyargs))) (pkg (cadr (assoc-keyword :pkg keyargs))) (no-override (cadr (assoc-keyword :no-override keyargs))) (order-subtopics (cadr (assoc-keyword :order-subtopics keyargs))) (default-parent (cadr (assoc-keyword :default-parent keyargs))) ((unless (or (eq order-subtopics t) (symbol-listp order-subtopics))) (cons 'with-output (cons ':gag-mode (cons 'nil (cons ':off (cons ':all (cons ':on (cons 'error (cons (cons 'make-event (cons (cons 'er (cons 'soft (cons ''defxdoc+ (cons '"Malformed :ORDER-SUBTOPICS input: ~x0" (cons (cons 'quote (cons order-subtopics 'nil)) 'nil))))) '(:on-behalf-of :quiet!))) 'nil)))))))))) (cons 'progn (cons (cons 'defxdoc (cons name (cons ':parents (cons parents (cons ':short (cons short (cons ':long (cons long (cons ':pkg (cons pkg (cons ':no-override (cons no-override 'nil)))))))))))) (append (cond ((eq order-subtopics t) (cons (cons 'xdoc::order-subtopics (cons name '(nil t))) 'nil)) ((eq order-subtopics nil) nil) ((eq (car (last order-subtopics)) t) (cons (cons 'xdoc::order-subtopics (cons name (cons (butlast order-subtopics 1) '(t)))) 'nil)) (t (cons (cons 'xdoc::order-subtopics (cons name (cons order-subtopics '(nil)))) 'nil))) (and default-parent (cons (cons 'local (cons (cons 'set-default-parents (cons name 'nil)) 'nil)) 'nil)))))))