;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'json) #@62 Indent by the maximum length, plus a colon, plus two spaces. (defvar nixos-options-name-indent-amount 0 (#$ . 103)) (defalias 'define-nixos-options-item '(macro . #[(item long-name) "\306\307P!\306\307\310Q!\311 G\\\312\313\"\306\314P!&\312\315\"'\306\316P!(\312\317\")\320\321 E\321\n F\322\323\f\324BB\325\326\fEE\327&\330'\331\332 \333BBD\257\327(\334)\335\300&\336BD\337B\322\340\312\341\342\n\343BB\344BBB\345BBBE\257\257.\207" [item name-const long-name-const long-name long-name-length-plus-padding long-name-docstring intern "nixos-options-" "-long-name" 3 format "The long description for %s." "nixos-options-get-" "Get the value of %s from OPTION." "nixos-options-display-" "Display the value for %s from OPTION." progn defconst if > (nixos-options-name-indent-amount) setq nixos-options-name-indent-amount defun (option) cdr assoc (option) (option) let (option) ((format-string (format "%%-%ds %%s\n" nixos-options-name-indent-amount))) (not (null item)) format-string concat (":") (item) ("") item-getter item-getter-docstring item-display item-display-docstring] 18])) (defconst nixos-options-name "name") #@32 The long description for name. (defconst nixos-options-name-long-name "Name" (#$ . 1254)) (byte-code "\301V\203\301\301\207" [nixos-options-name-indent-amount 7] 2) #@36 Get the value of name from OPTION. (defalias 'nixos-options-get-name #[(option) "\302 \"A\207" [nixos-options-name option assoc] 3 (#$ . 1429)]) #@41 Display the value for name from OPTION. (defalias 'nixos-options-display-name #[(option) "\305!\306\307 \"\211\203\306\n\f\310P #\202\311*\207" [option nixos-options-name-indent-amount format-string item nixos-options-name-long-name nixos-options-get-name format "%%-%ds %%s\n" ":" ""] 5 (#$ . 1581)]) (defconst nixos-options-type "type") #@32 The long description for type. (defconst nixos-options-type-long-name "Type" (#$ . 1933)) (byte-code "\301V\203\301\301\207" [nixos-options-name-indent-amount 7] 2) #@36 Get the value of type from OPTION. (defalias 'nixos-options-get-type #[(option) "\302 \"A\207" [nixos-options-type option assoc] 3 (#$ . 2108)]) #@41 Display the value for type from OPTION. (defalias 'nixos-options-display-type #[(option) "\305!\306\307 \"\211\203\306\n\f\310P #\202\311*\207" [option nixos-options-name-indent-amount format-string item nixos-options-type-long-name nixos-options-get-type format "%%-%ds %%s\n" ":" ""] 5 (#$ . 2260)]) (defconst nixos-options-description "description") #@39 The long description for description. (defconst nixos-options-description-long-name "Description" (#$ . 2626)) (byte-code "\301V\203\301\301\207" [nixos-options-name-indent-amount 14] 2) #@43 Get the value of description from OPTION. (defalias 'nixos-options-get-description #[(option) "\302 \"A\207" [nixos-options-description option assoc] 3 (#$ . 2823)]) #@48 Display the value for description from OPTION. (defalias 'nixos-options-display-description #[(option) "\305!\306\307 \"\211\203\306\n\f\310P #\202\311*\207" [option nixos-options-name-indent-amount format-string item nixos-options-description-long-name nixos-options-get-description format "%%-%ds %%s\n" ":" ""] 5 (#$ . 2996)]) (defconst nixos-options-default "default") #@35 The long description for default. (defconst nixos-options-default-long-name "Default value" (#$ . 3382)) (byte-code "\301V\203\301\301\207" [nixos-options-name-indent-amount 16] 2) #@39 Get the value of default from OPTION. (defalias 'nixos-options-get-default #[(option) "\302 \"A\207" [nixos-options-default option assoc] 3 (#$ . 3573)]) #@44 Display the value for default from OPTION. (defalias 'nixos-options-display-default #[(option) "\305!\306\307 \"\211\203\306\n\f\310P #\202\311*\207" [option nixos-options-name-indent-amount format-string item nixos-options-default-long-name nixos-options-get-default format "%%-%ds %%s\n" ":" ""] 5 (#$ . 3734)]) (defconst nixos-options-example "example") #@35 The long description for example. (defconst nixos-options-example-long-name "Example value" (#$ . 4104)) (byte-code "\301V\203\301\301\207" [nixos-options-name-indent-amount 16] 2) #@39 Get the value of example from OPTION. (defalias 'nixos-options-get-example #[(option) "\302 \"A\207" [nixos-options-example option assoc] 3 (#$ . 4295)]) #@44 Display the value for example from OPTION. (defalias 'nixos-options-display-example #[(option) "\305!\306\307 \"\211\203\306\n\f\310P #\202\311*\207" [option nixos-options-name-indent-amount format-string item nixos-options-example-long-name nixos-options-get-example format "%%-%ds %%s\n" ":" ""] 5 (#$ . 4456)]) (defconst nixos-options-declarations "declarations") #@40 The long description for declarations. (defconst nixos-options-declarations-long-name "Declared in" (#$ . 4836)) (byte-code "\301V\203\301\301\207" [nixos-options-name-indent-amount 14] 2) #@44 Get the value of declarations from OPTION. (defalias 'nixos-options-get-declarations #[(option) "\302 \"A\207" [nixos-options-declarations option assoc] 3 (#$ . 5035)]) #@49 Display the value for declarations from OPTION. (defalias 'nixos-options-display-declarations #[(option) "\305!\306\307 \"\211\203\306\n\f\310P #\202\311*\207" [option nixos-options-name-indent-amount format-string item nixos-options-declarations-long-name nixos-options-get-declarations format "%%-%ds %%s\n" ":" ""] 5 (#$ . 5211)]) #@31 Location of the options file. (defvar nixos-options-json-file (byte-code "\302\303\304\305\306!#\307\310 \"*\207" [cmd dir "nix-build --no-out-link '' -A options" replace-regexp-in-string "\n\\'" "" shell-command-to-string expand-file-name "share/doc/nixos/options.json"] 5) (#$ . 5558)) #@98 Return the string representation of the boolean VALUE. Returns VALUE unchanged if not a boolean. (defalias 'nixos-options--boolean-string #[(value) "\301\267\202\n\302\207\303\207\207" [value #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (t 6 :json-false 8)) "true" "false"] 2 (#$ . 5882)]) (defalias 'nixos-options--make-alist #[(option) "@A\306!\307!\n\203\310 \"\311\n!\241\210 \203)\310\n\"\311 !\241\210 \fB\211\f \235\203: \210\202?\f B)\f ,B\207" [option example default data name nixos-options-default nixos-options-get-default nixos-options-get-example assoc nixos-options--boolean-string nixos-options-example nixos-options-name #1=#:x] 6]) (defvar nixos-options (byte-code "\303\304 !\305\306\n\"*\207" [json-key-type nixos-options-json-file raw-options string json-read-file mapcar nixos-options--make-alist] 3)) (defalias 'nixos-options-get-documentation-for-option #[(option) "\301!\302!\303!\304!\305!\306!\260\207" [option nixos-options-display-name nixos-options-display-type nixos-options-display-description nixos-options-display-default nixos-options-display-example nixos-options-display-declarations] 7]) #@49 Display documentation buffer with contents DOC. (defalias 'nixos-options-doc-buffer #[(doc) "\302\303!rq\210\304\305!\210\306 \210 c\210eb\210\304\307!\210*\207" [buf doc get-buffer-create "*nixos-options-doc*" view-mode -1 erase-buffer 1] 2 (#$ . 7086)]) (defalias 'nixos-options-get-option-by-name #[(name) "\302 \"\207" [name nixos-options assoc] 3]) (provide 'nixos-options)