;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\310\311\312\313\314\301%\210\315\316\317\320\321DD\322\314\311\323\320&\210\315\324\317\320\325DD\326\314\311\323\327&\210\310\330\312\331\314\311\314\332&\210\333\334\335\336\314\330%\210\333\337\340\341\314\330%\210\333\342\343\344\314\330%\210\333\345\346\347\314\330%\210\333\350\351\352\314\330%\210\333\353\354\355\314\330%\207" [require nix nix-format nix-shebang nix-shell nix-repl smie ffap custom-declare-group nix-mode nil "Nix mode customizations" :group custom-declare-variable nix-indent-function funcall function #[0 "\300\207" [smie-indent-line] 1] "The function to use to indent.\n\nValid functions for this are:\n\n- ‘indent-relative’\n- ‘nix-indent-line' (buggy)\n- `smie-indent-line' (‘nix-mode-use-smie’ must be enabled)" :type nix-mode-use-smie #[0 "\300\207" [t] 1] "Whether to use SMIE when editing Nix files.\nThis is enabled by default, but can take a while to load with\nvery large Nix files (all-packages.nix)." boolean nix-faces "Nix faces." faces custom-declare-face nix-keyword-face ((t :inherit font-lock-keyword-face)) "Face used to highlight Nix keywords." nix-keyword-warning-face ((t :inherit font-lock-warning-face)) "Face used to highlight Nix warning keywords." nix-builtin-face ((t :inherit font-lock-builtin-face)) "Face used to highlight Nix builtins." nix-constant-face ((t :inherit font-lock-constant-face)) "Face used to highlight Nix constants." nix-attribute-face ((t :inherit font-lock-variable-name-face)) "Face used to highlight Nix attributes." nix-antiquote-face ((t :inherit font-lock-preprocessor-face)) "Face used to highlight Nix antiquotes."] 8) #@28 List of supported systems. (defconst nix-system-types '("x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin") (#$ . 1807)) (defconst nix-keywords '("if" "then" "else" "with" "let" "in" "rec" "inherit" "or")) (defconst nix-builtins '("builtins" "baseNameOf" "derivation" "dirOf" "true" "false" "null" "isNull" "toString" "fetchTarball" "import" "map" "removeAttrs" "toString" "derivationStrict" "placeholder" "scopedImport" "fromTOML" "fetchTarball" "fetchGit" "fetchTree" "fetchMercurial")) (defconst nix-warning-keywords '("assert" "abort" "throw")) (defconst nix-re-file-path "[a-zA-Z0-9._\\+-]*\\(/[a-zA-Z0-9._\\+-]+\\)+") (defconst nix-re-url "[a-zA-Z][a-zA-Z0-9\\+-\\.]*:[a-zA-Z0-9%/\\?:@&=\\+\\$,_\\.!~\\*'-]+") (defconst nix-re-bracket-path "<[a-zA-Z0-9._\\+-]+\\(/[a-zA-Z0-9._\\+-]+\\)*>") (defconst nix-re-variable-assign "\\<\\([a-zA-Z_][a-zA-Z0-9_'-.]*\\)[ ]*=[^=]") (defconst nix-re-caps " =[ \n]\\|(\\|{\\|\\[\\|\\bwith\\b\\|\\blet\\b\\|\\binherit\\b") (defconst nix-re-ends ";\\|)\\|\\]\\|}\\|\\bin\\b") (defconst nix-re-quotes "''\\|\"") (defconst nix-re-comments "#\\|/*\\|*/") #@117 Produce a regexp matching some keywords of Nix. KEYWORDS a list of strings to match as Nix keywords. (fn KEYWORDS) (defalias 'nix-re-keywords #[257 "\300\301\302\"\303Q\207" ["\\(?:[[:space:];:{}()]\\|^\\)" regexp-opt t "\\(?:[[:space:];:{}()]\\|$\\)"] 5 (#$ . 2916)]) #@29 Font lock keywords for nix. (defconst nix-font-lock-keywords (byte-code "\306!\307B\306 !\310B\306\n!\311B \312B\f\313B \314B\315B\316BBBBBBB\207" [nix-keywords nix-warning-keywords nix-builtins nix-re-url nix-re-file-path nix-re-variable-assign nix-re-keywords (1 'nix-keyword-face) (1 'nix-keyword-warning-face) (1 'nix-builtin-face) (0 'nix-constant-face) (0 'nix-constant-face) (1 'nix-attribute-face) (0 'nix-constant-face) ((nix--syntax-match-antiquote 0 'nix-antiquote-face t)) nix-re-bracket-path] 8) (#$ . 3193)) (defconst nix--variable-char "[a-zA-Z0-9_'-]") #@28 Abbrev table for Nix mode. (defvar nix-mode-abbrev-table (make-abbrev-table) (#$ . 3771)) #@28 Syntax table for Nix mode. (defvar nix-mode-syntax-table (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\313#\210\301\317\315#\210\301\320\321#\210\301\322\321#\210\301\323\321#\210\301\324\321#\210\301\325\321#\210\207" [make-syntax-table modify-syntax-entry 47 ". 14" 42 ". 23" 35 "< b" 10 "> b" 95 "_" 46 "'" 45 39 61 "." 60 62 34 92] 5) (#$ . 3867)) #@65 Find antiquote within a Nix expression up to LIMIT. (fn LIMIT) (defalias 'nix--syntax-match-antiquote #[257 "`V?\205V\300`\301\"\203\302``TD!\210\303u\210\304\207\305`\301\306$\211\205T\211V?\205T\211b\210\211f\211\307\267\202Q\303u\210\302S`D!\210\304\202R\303u\210\302`D!\210\304\202R\306\262\262\207" [get-text-property nix-syntax-antiquote set-match-data 1 t next-single-char-property-change nil #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (123 54 125 68))] 6 (#$ . 4320)]) #@150 Mark string as a Nix string. POS position of start of string STRING-TYPE type of string based off of Emacs syntax table types (fn POS STRING-TYPE) (defalias 'nix--mark-string #[514 "\300\211T\301\302$\210\300\211T\303$\207" [put-text-property syntax-table (15) nix-string-type] 7 (#$ . 4862)]) #@51 Get the result of `syntax-ppss' at POS. (fn POS) (defalias 'nix--get-parse-state #[257 "\212\300 \301\302\"\216\303!)\262)\207" [match-data make-closure #[0 "\301\300\302\"\207" [V0 set-match-data evaporate] 3] syntax-ppss] 5 (#$ . 5167)]) #@64 Get the type of string based on PARSE-STATE. (fn PARSE-STATE) (defalias 'nix--get-string-type #[257 "\3008\211\205 \301\302\"\207" [8 get-text-property nix-string-type] 5 (#$ . 5417)]) #@88 Determine if this is an open brace string type based on PARSE-STATE. (fn PARSE-STATE) (defalias 'nix--open-brace-string-type #[257 "\211A@\211\205 \300\301\"\207" [get-text-property nix-string-type] 5 (#$ . 5612)]) #@86 Determine if this is an open brace antiquote based on PARSE-STATE. (fn PARSE-STATE) (defalias 'nix--open-brace-antiquote-p #[257 "\211A@\211\205 \300\301\"\207" [get-text-property nix-syntax-antiquote] 5 (#$ . 5836)]) #@27 Handle Nix single quotes. (defalias 'nix--single-quotes #[0 "\302\224\302\225\303!\304!\211\305=\206,\211\306=\205,\307W\205,S{\306\310\311#)\266\203?\205f\211\306=\203@\312\313\"\210\314\\\262\315Z\316\"\314=\205fd\314\\^{\211\317\235\203_\314\\b\202d\312S\313\"\262\207" [nix--variable-char inhibit-changing-match-data 0 nix--get-parse-state nix--get-string-type 34 nil 1 t string-match nix--mark-string 39 2 mod 3 ("${" "\\n" "\\r" "\\t")] 11 (#$ . 6063)]) #@40 Handle Nix escaped antiquote dq style. (defalias 'nix--escaped-antiquote-dq-style #[0 "\300\224\301!\302!\211\303=\205\304T\303\"\207" [0 nix--get-parse-state nix--get-string-type 39 nix--antiquote-open-at] 6 (#$ . 6557)]) #@27 Handle Nix double quotes. (defalias 'nix--double-quotes #[0 "\300\224\301!\302!\211\303=?\205\304\305\"\207" [0 nix--get-parse-state nix--get-string-type 39 nix--mark-string 34] 6 (#$ . 6791)]) #@82 Handle Nix antiquote open at based on POS and STRING-TYPE. (fn POS STRING-TYPE) (defalias 'nix--antiquote-open-at #[514 "\300\211T\301\302$\210\300\303\\\304$\210\300T\303\\\305\306$\207" [put-text-property syntax-table (15) 2 nix-string-type nix-syntax-antiquote t] 7 (#$ . 6996)]) #@28 Handle Nix antiquote open. (defalias 'nix--antiquote-open #[0 "\300\224\301!\302!\211\205\303\"\207" [0 nix--get-parse-state nix--get-string-type nix--antiquote-open-at] 6 (#$ . 7292)]) #@39 Handle Nix antiquote close then open. (defalias 'nix--antiquote-close-open #[0 "\300\224\301!\302!\211\203\303T\"\207\304!\205:\305!\306\307\\\310$\210\306\211T\311\312$\210\306\313\\\307\\\311\312$\262\207" [0 nix--get-parse-state nix--get-string-type nix--antiquote-open-at nix--open-brace-antiquote-p nix--open-brace-string-type put-text-property 3 nix-string-type nix-syntax-antiquote t 2] 9 (#$ . 7490)]) #@29 Handle Nix antiquote close. (defalias 'nix--antiquote-close #[0 "\301\224\302!\303!?\205\315\304!\211\205\313\305\211T\306$\210\305\211T\307\310$\210Td\311\\^{\312\267\202\310\313\314\"\204?\313\315\"\203N\316T\"\210\301\225\\Tb\202\311\317\320\310\313#)\266\203\203e\321\\b\202\311TdW\205\311\316T\"\210\321\\b\202\311\313\322\"\204\216\313\323\"\204\216\313\324\"\203\235\316T\"\210\301\225\\Tb\202\311\325\320\310\313#)\266\203\203\264\326\\b\202\311TdW\205\311\316T\"\210\321\\b\202\311\320\262\262\207" [inhibit-changing-match-data 0 nix--get-parse-state nix--get-string-type nix--open-brace-string-type put-text-property nix-string-type nix-syntax-antiquote t 5 #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (34 49 39 121)) string-match "^\\\\\"" "^\\\\\\${" nix--mark-string "^\"" nil 2 "^'''" "^''\\${" "^''\\\\[nrt]" "^''" 3] 11 (#$ . 7924)]) #@70 Special syntax properties for Nix from START to END. (fn START END) (defalias 'nix-syntax-propertize #[514 "b\210\300\301#\210b\210`W\205\362\302\303\304#\205\362\305\224\2039\306\307!\211A\310\233\241\210\311!\266\312\224\210\312\225\210\202\313\224\203V\306\307!\211A\314\233\241\210\311!\266\312\224\210\312\225\210\202\315\224\203p\306\307!\211A\316\233\241\210\311!\266\317 \210\202\310\224\203\212\306\307!\211A\320\233\241\210\311!\266\321 \210\202\322\224\203\244\306\307!\211A\323\233\241\210\311!\266\324 \210\202\314\224\203\276\306\307!\211A\325\233\241\210\311!\266\326 \210\202\327\224\203\330\306\307!\211A\330\233\241\210\311!\266\331 \210\202\316\224\203\306\307!\211A\332\233\241\210\311!\266\333 \210\202\207" [remove-text-properties (nix-string-type nil nix-syntax-antiquote nil) re-search-forward "\\(\\\\\\\\\\)\\|\\(\\\\\"\\)\\|\\(\\\\\\${\\)\\|\\('\\{2,\\}\\)\\|\\(}\\${\\)\\|\\(\\${\\)\\|\\(}\\)\\|\\(\"\\)" t 1 match-data ints 4 set-match-data 0 2 6 3 8 nix--escaped-antiquote-dq-style 10 nix--single-quotes 5 12 nix--antiquote-close-open 14 nix--antiquote-open 7 16 nix--antiquote-close 18 nix--double-quotes] 8 (#$ . 8881)]) (defconst nix-smie-grammar '((:smie-closer-alist (#1="if" . #2="else") (#1# . #5="then") (#6="let" . #3="in") (#7="with" . "nonsep-;") (#8="assert" . #4="nonsep-;") (#9="{" . "}")) (" -fseqskip- " 277 289) (" -bseqskip- " 278 265) ("?" 254 266) ("++" 243 243) ("/" 232 232) ("*" 232 232) ("+" 221 221) ("-" 221 221) ("!" 210 198) ("//" 187 199) (">=" 169 170) (">" 171 172) ("<=" 173 174) ("<" 175 176) ("!=" 155 156) ("==" 157 158) ("&&" 144 144) ("||" 133 133) ("->" 122 111) (" -fexpskip- " 52 64) (" -bexpskip- " 53 41) (" -dummy- " 0 1) ("," 16 16) ("arg-?" 290 30) (";" 17 17) ("=" 28 29) (#2# 75 87) (#3# 4 89) (#4# 3 88) (#5# 5 75) (#1# (291) 5) (#6# (292) 4) (#7# (293) 3) (#8# (294) 3) (#9# (295) 2) (":" 100 86) ("}" 2 (296)))) (defconst nix-smie--2char-symbols '("->" "||" "&&" "==" "!=" "<=" ">=" "++" "//")) (defconst nix-smie--infix-symbols-re (byte-code "\301\302\303\"!\207" [nix-smie--2char-symbols regexp-opt append (":" "<" ">" "-" "+" "*" "/" "?")] 4)) (defconst nix-smie-indent-tokens-re "\\(?:else\\|if\\|let\\|then\\|[(=[{]\\)") #@35 Core smie rules. (fn KIND TOKEN) (defalias 'nix-smie-rules #[514 "\304B\211:\205\332\211\242\211\305=\203r\243\306\307\310#)\266\203\203(\311 \202m\211\312\267\202[!\202m\306u\210\313 \210\314 \203F\315iB\202m\311 \202m\316 \206m\311 \202m\317\n!\202m\306\307\310#)\266\203\205m\311 \262\202\330\243\211\320\232\203\201!\202\326\321=\204\213\306\202\326\211\322\267\202\257\317 \202\326\323 \212\324 \325\232\205\251\211`X\205\251\315iB)\262\202\326 \306\307\310#)\266\203\205\326\326`[!\210\323 \327!\210`W\205\324\311\330!\262\262\262\207" [nix-smie-indent-tokens-re inhibit-changing-match-data tab-width nix-smie--infix-symbols-re #[257 "\300 \301v\210\302\303!\210\304\267\202,\305 \203\306\307!\207\310iB\207n\203\"\311\207\211`X\205-\310iB\207\301\207" [line-beginning-position nil smie-backward-sexp t #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:before 15 :after 28)) smie-rule-hanging-p nix-smie--indent-anchor 0 column (column . 0)] 4 "\n\n(fn KIND)"] :after nil t string-match nix-smie--indent-anchor #s(hash-table size 4 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (#1="in" 46 "nonsep-;" 53 ":" 75 "," 85)) backward-sexp smie-rule-bolp column nix-smie--indent-args-line smie-rule-parent #1# :before #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("," 145 "if" 150)) line-beginning-position nix-smie--backward-token "else" forward-comment smie-backward-sexp 0] 13 (#$ . 11154)]) #@68 Return the anchor's offset from the beginning of the current line. (defalias 'nix-smie--anchor #[0 "\212\300 \210\301 \302\211\303d!\210m\206`W?\205Ii\262\3042Gm?\205F\305 @\262`X\205F\211\306\232\203\307u\210\310\311!\210i\262\312\304\302\"\210\2020\210\266\203)\207" [beginning-of-line line-end-position nil forward-comment break smie-indent-forward-token "=" -1 smie-backward-sexp " -bseqskip- " throw] 6 (#$ . 12724)]) #@69 Intended for use only in the rules function. (fn &optional INDENT) (defalias 'nix-smie--indent-anchor #[256 "\211\206\301\302 \\B\207" [tab-width column nix-smie--anchor] 5 (#$ . 13169)]) #@75 Indent the body of a lambda whose argument(s) are on a line of their own. (defalias 'nix-smie--indent-args-line #[0 "\212\300u\210\301\3022&\211\301\232\205%\303\304\305!8\262\306 \203 \307\302\310iB\"\210\202 0\262)\207" [nil ":" break 2 smie-backward-sexp t smie-rule-bolp throw column] 5 (#$ . 13368)]) (defconst nix-smie--path-chars "a-zA-Z0-9-+_.:/~") #@63 Skip forward a path enclosed in angle brackets, e.g  (defalias 'nix-smie--skip-angle-path-forward #[0 "`\300f\301=\205%\300u\210\302\303\304\"\203!\300f\305=\203!\300u\210\306`\"\207\300b\210\207" [nil 60 nix-smie--skip-path forward t 62 buffer-substring-no-properties] 4 (#$ . 13737)]) #@64 Skip backward a path enclosed in angle brackets, e.g  (defalias 'nix-smie--skip-angle-path-backward #[0 "``Sf\300=\205'\301u\210\302\303\304\"\203#`Sf\305=\203#\301u\210\306`\"\207\307b\210\207" [62 -1 nix-smie--skip-path backward t 60 buffer-substring-no-properties nil] 4 (#$ . 14044)]) #@64 Skip path related characters. (fn HOW &optional NO-SEP-CHECK) (defalias 'nix-smie--skip-path #[513 "`\302\267\202\303w\210\202\303x\210\202\304\305\"\266\306`\"\203+\307GW\204;\310\303\311\312#)\266\203\203<\207\303b\210\207" [nix-smie--path-chars inhibit-changing-match-data #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (forward 7 backward 14)) nil error "No clause matching `%S'" buffer-substring-no-properties 0 "/" t string-match] 11 (#$ . 14353)]) #@12 (fn HOW) (defalias 'nix-smie--skip-symbol #[257 "`\301\267\202\302\303!\202\304\303!\202\305\306\"\262\307!\211\310U\206K\211\311U\2032\312`\"\235\206K\313W\203G\313W\203C\310\202D\314\\b\207b\210\315\207" [nix-smie--2char-symbols #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (backward 7 forward 13)) skip-syntax-backward "._" skip-syntax-forward error "No clause matching `%S'" abs 1 2 buffer-substring-no-properties 0 -1 nil] 7 (#$ . 14877)]) #@25 Move forward one token. (defalias 'nix-smie--forward-token-1 #[0 "\300d!\210\301 \206\302\303!\206\304`\305\306!\307U\203\310\303!\210`\"\207" [forward-comment nix-smie--skip-angle-path-forward nix-smie--skip-path forward buffer-substring-no-properties skip-syntax-forward "'w_" 0 nix-smie--skip-symbol] 4 (#$ . 15393)]) #@54 Move forward one token, skipping certain characters. (defalias 'nix-smie--forward-token #[0 "\300 \211\301\235\203 \212\302 )\207\207" [nix-smie--forward-token-1 (";" "?") nix-smie--backward-token] 3 (#$ . 15726)]) #@26 Move backward one token. (defalias 'nix-smie--backward-token-1 #[0 "\300`[!\210\301 \206 \302\303!\206 \304`\305\306!\307U\203\310\303!\210`\"\207" [forward-comment nix-smie--skip-angle-path-backward nix-smie--skip-path backward buffer-substring-no-properties skip-syntax-backward "'w_" 0 nix-smie--skip-symbol] 4 (#$ . 15948)]) #@55 Move backward one token, skipping certain characters. (defalias 'nix-smie--backward-token #[0 "\300 \211G\301U?\205#\211\302\267\202\"\303 \203\304\207\305\207\306 \203 \307\207\310\207\211\207" [nix-smie--backward-token-1 0 #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (";" 16 "?" 25)) nix-smie--nonsep-semicolon-p "nonsep-;" ";" nix-smie--arg-\?-p "arg-?" "?"] 3 (#$ . 16287)]) #@65 Whether the semicolon at point terminates a `with' or `assert'. (defalias 'nix-smie--nonsep-semicolon-p #[0 "\212\300\301\302!8\303\235)\207" [2 smie-backward-sexp " -bexpskip- " ("with" "assert")] 3 (#$ . 16721)]) #@72 Whether the question mark at point is part of an argument declaration. (defalias 'nix-smie--arg-\?-p #[0 "\300\301 \210\301 8\302\235\207" [2 smie-backward-sexp ("{" ",")] 2 (#$ . 16942)]) #@62 Whether there are no tokens after point on the current line. (defalias 'nix-smie--eol-p #[0 "\300 \212\301d!\210m\206\211`W)\207" [line-end-position forward-comment] 3 (#$ . 17137)]) #@39 Align close paren with opening paren. (defalias 'nix-smie--indent-close #[0 "\212\300\301!\205/\302u\210\3031-\304\302!\210\305f\306>\203'\212\305u\210\307 )\204'i\202)\310 0\202/\210\305)\207" [looking-at "\\s)" 1 (scan-error) backward-sexp nil (91 123) nix-smie--eol-p nix-smie--anchor] 2 (#$ . 17328)]) #@152 This function replaces and is based on `smie-indent-exps'. An argument to a function is indented relative to the function, not to any other arguments. (defalias 'nix-smie--indent-exps #[0 "\212\301\211`\302\303\304!8\262\211`=?\262\204\301\202'\305\232\203#i\202'\306 \\\262\266\202)\207" [tab-width nil 2 smie-backward-sexp " -bseqskip- " "[" current-indentation] 6 (#$ . 17647)]) #@30 Find the previous Nix token. (defalias 'nix-find-backward-matching-token #[0 "\300\301!\203;\302\211\303V\203:\304\305\306\307#\203:\310\311`!!\204\312 \204\300\313!\203-\211S\2025\300\314!\2055\211T\262\202\207\300\315!\203F\316 \210\307\207\300\317!\203Q\316 \210\307\207\300\320!\205[\316 \210\307\207" [looking-at "in\\b" 1 0 re-search-backward "\\b\\(let\\|in\\)\\b" nil t nix--get-string-type nix--get-parse-state nix-is-comment-p "let" "in" "}" backward-up-list "]" ")"] 5 (#$ . 18046)]) #@42 Match the previous line’s indentation. (defalias 'nix-indent-to-backward-match #[0 "\212\300 \210\301\302w\210\303 \205\304 )\211\205\305!\210\306\207" [beginning-of-line "[:space:]" nil nix-find-backward-matching-token current-indentation indent-line-to t] 3 (#$ . 18563)]) #@35 Indent the first line in a block. (defalias 'nix-indent-first-line-in-block #[0 "\212\300 \210\301\302x\210\303\304 \305 \"\306\307\"\2048\306\310\"\2048\306\311\"\2048\306\312\"\2048\306\313\"\2048\306\314\"\205<\315\316 \\\262)\211\205H\317!\210\320\207" [beginning-of-line "\n[:space:]" nil buffer-substring-no-properties line-beginning-position line-end-position string-match "let$" "import$" "\\[$" "=$" "($" "{$" 2 current-indentation indent-line-to t] 4 (#$ . 18851)]) #@62 Search backward for items of interest regarding indentation. (defalias 'nix-mode-search-backward #[0 "\303\304\305#\210\303 \304\305#\210\303\n\304\305#\207" [nix-re-ends nix-re-quotes nix-re-caps re-search-backward nil t] 4 (#$ . 19348)]) #@39 Indent the start of a nix expression. (defalias 'nix-indent-expression-start #[0 "\305\306\211\307 \212\310 \210\204]\311 \203]\312!\203!\313\306\314#\210\202 \312 !\2030\313 \306\314#\210\202 \312\n!\203=T\262\202 \312 !\203 \314\262\305V\203SS\262\202 \307 \262\314\262\202 )\203h\315\f\\!\210\207" [nix-re-quotes nix-re-comments nix-re-ends nix-re-caps tab-width 0 nil current-indentation beginning-of-line nix-mode-search-backward looking-at re-search-backward t indent-line-to] 8 (#$ . 19595)]) #@44 Get the indent level of the previous line. (defalias 'nix-indent-prev-level #[0 "\212\300 \210\301\302x\210\303 )\207" [beginning-of-line "\n[:space:]" nil current-indentation] 2 (#$ . 20128)]) #@38 Format the entire `nix-mode' buffer. (defalias 'nix-mode-format #[0 "\302=\2055\212eb\210`d\232?\2054\303\304\305!\306\307\310#)\266\203\311=\203+\312 \210\202.\313 \210\306y\210\202\n)\207" [major-mode inhibit-changing-match-data nix-mode "^[ -]*$" thing-at-point line nil t string-match 0 delete-horizontal-space nix-indent-line] 7 (#$ . 20328) nil]) #@42 Indent current line in a Nix expression. (defalias 'nix-indent-line #[0 "\212\301 \302U\203\303\304!\210\202y\212\305 \210\306 )\203!\303\307 !\210\202y\212\305 \210\310\311 8)\203e\303\307 \212\312y\210\313\210\314\313x\210\315\316\304\")\203H\302\202I\304\212\305 \210\314\313w\210\317\316!)\203\\\312\202]\304\\_\\!\210\202y\320 \204y\321 \204y\322 \204y\303\307 !\210`)\211`V\205\203\211b\207" [tab-width line-number-at-pos 1 indent-line-to 0 beginning-of-line nix-is-comment-p nix-indent-prev-level 3 syntax-ppss -1 nil "[:space:]" looking-back "''" looking-at nix-indent-to-backward-match nix-indent-first-line-in-block nix-indent-expression-start] 6 (#$ . 20697) nil]) #@30 Whether we are in a comment. (defalias 'nix-is-comment-p #[0 "\300\301 8\207" [4 syntax-ppss] 2 (#$ . 21396)]) #@29 Whether we are in a string. (defalias 'nix-is-string-p #[0 "\301!\206 \302\303`!!\207" [nix-re-quotes looking-at nix--get-string-type nix--get-parse-state] 3 (#$ . 21513)]) #@124 Indent on a whole region. Enabled by default. START where to start in region. END where to end the region. (fn START END) (defalias 'nix-indent-region #[514 "\212b\210`W\2059n\203l\2043\212\301 \302y\210\301 \203\"\211?\206$\301 ?\262)\2033\303 \2033 \210\304y\210\202)\207" [nix-indent-function nix-is-comment-p -1 nix-is-string-p 1] 4 (#$ . 21695) (byte-code "\300 \301 D\207" [region-beginning region-end] 2)]) #@198 Support `ffap' for declarations. If STR contains brackets, call `nix-instantiate' to find the location of STR. If `nix-instantiate' has a nonzero exit code, don’t do anything (fn STR) (defalias 'nix-mode-ffap-nixpkgs-path #[257 "\302\"\2054\303 !\2054\304\305\306\"r\211q\210\307\310\"\216\311 \312p\312\313\314&\315=\2051\316 \315\317 SO*\262\207" [nix-re-bracket-path nix-instantiate-executable string-match executable-find generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] call-process nil "--eval" "-E" 0 buffer-string buffer-size] 10 (#$ . 22131)]) #@20 Menu for Nix mode. (defvar nix-mode-menu (make-sparse-keymap "Nix") (#$ . 22776)) #@33 Local keymap used for Nix mode. (defvar nix-mode-map (make-sparse-keymap) (#$ . 22864)) #@49 Create the keymap associated with the Nix mode. (defalias 'nix-create-keymap #[0 "\300\207" ["Create the keymap associated with the Nix mode."] 1 (#$ . 22958)]) #@47 Create the Nix menu as shown in the menu bar. (defalias 'nix-create-menu #[0 "\301\302\303!\210\304\305\306$\207" [nix-mode-map ("Nix" ["Format buffer" nix-format-buffer t]) (lambda (def-tmp-var) (defvar nix-mode-menu def-tmp-var #1="Menu keymap for Nix mode")) nil easy-menu-do-define nix-mode-menu #1#] 6 (#$ . 23125)]) (byte-code "\300 \210\301 \207" [nix-create-keymap nix-create-menu] 1) (defvar nix-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [nix-mode-hook variable-documentation put "Hook run after entering Nix mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp nix-mode-map definition-name nix-mode] 4) (defvar nix-mode-map (make-sparse-keymap)) (byte-code "\300\301N\204\302\300\301\303\304!#\210\302\305\306\307#\210\302\305\310\305#\207" [nix-mode-map variable-documentation put purecopy "Keymap for `nix-mode'." nix-mode derived-mode-parent prog-mode custom-mode-group] 5) #@658 Major mode for editing Nix expressions. The following commands may be useful: '\[newline-and-indent]' Insert a newline and move the cursor to align with the previous non-empty line. '\[fill-paragraph]' Refill a paragraph so that all lines are at most `fill-column' lines long. This should do the right thing for comments beginning with `#'. However, this command doesn't work properly yet if the comment is adjacent to code (i.e., no intervening empty lines). In that case, select the text to be refilled and use `\[fill-region]' instead. The hook `nix-mode-hook' is run when Nix mode is started. \{nix-mode-map}  (defalias 'nix-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320 !\210\321\f!\210 9\306\322!\210\323\306\324!\210\325\306\326!\210\327\306\330!\210\331\306\332!\210\333\306\334!\210\307:\203~\335;\336\337\340\341\342&\210\306\343!\210\325#\344\345&\"\306\346!\210&\306\347!\210\350'\306\351!\210\352)\306\353!\210\354+\306\355!\210\356-\306\357!\210\307/\306\360!\210\3070\306\361!\210\3621\306\363!\21013\364< \"\210\365=B=\366>B>)\367\370!\207" [delay-mode-hooks major-mode mode-name nix-mode-map nix-mode-syntax-table nix-mode-abbrev-table make-local-variable t prog-mode nix-mode "Nix" mode-class put keymap-parent set-keymap-parent current-local-map use-local-map set-syntax-table indent-tabs-mode nil tab-width 2 electric-indent-chars (10 123 125 91 93 40 41) font-lock-defaults (nix-font-lock-keywords) syntax-propertize-function nix-syntax-propertize parse-sexp-lookup-properties smie-setup nix-smie-rules :forward-token nix-smie--forward-token :backward-token nix-smie--backward-token smie-indent-basic mapcar #[257 "\211\300\267\207\301\207\302\207\207" [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (smie-indent-exps 4 smie-indent-close 6)) nix-smie--indent-exps nix-smie--indent-close] 3 "\n\n(fn FUN)"] smie-indent-functions indent-line-function #[0 "\204 \302=\203 \303 \207 \207" [nix-mode-use-smie nix-indent-function smie-indent-line indent-relative] 2] comment-start "# " comment-end "" comment-start-skip "\\(^\\|\\s-\\);?#+ *" comment-multi-line adaptive-fill-mode paragraph-start "[ ]*\\(#+[ ]*\\)?$" paragraph-separate easy-menu-add (nix-mode . nix-mode-ffap-nixpkgs-path) (nix-mode "--:\\\\${}<>+@-Z_[:alpha:]~*?" "@" "@;.,!:") run-mode-hooks nix-mode-hook local-abbrev-table nix-mode-use-smie nix-smie-grammar nix-mode-menu ffap-alist ffap-string-at-point-mode-alist] 7 (#$ . 24179) nil]) (byte-code "\300\301\302\"\210\303\304!\207" [add-to-list auto-mode-alist ("\\.nix\\'" . nix-mode) provide nix-mode] 3)