;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require ess-utils regexp-opt] 2) (defalias 'ess-backward-sexp #[(&optional N) "\301\206\302[!\207" [N ess-forward-sexp 1] 2]) (defalias 'ess-forward-sexp #[(&optional N) "\204\301\3021\303\304`\"\206\305!b\2100\207\210\306\207" [N 1 (error) t scan-sexps buffer-end nil] 4]) (defalias 'ess-up-list #[(&optional N) "\3021\303\304 !\210)\3050\207\210\303\207" [forward-sexp-function N (error) nil up-list t] 2]) (defalias 'ess-backward-up-list #[(&optional N) "\301\206\302[!\207" [N ess-up-list 1] 2]) (defalias 'ess-forward-char #[(&optional N) "`dU?\205\206\f\301u\210\302\207" [N 1 t] 2]) (defalias 'ess-backward-char #[(&optional N) "`eU?\205\206\f\301[u\210\302\207" [N 1 t] 2]) #@91 Go to POS if it is non-nil. If POS is nil, return nil. Otherwise return position itself. (defalias 'ess-goto-char #[(pos) "\205b\207" [pos] 1 (#$ . 837)]) #@59 Like `looking-at' but consumes blanks and comments first. (defalias 'ess-looking-at #[(regex &optional newlines) "\212\302!\210\303 !)\207" [newlines regex ess-skip-blanks-forward looking-at] 2 (#$ . 1003)]) #@140 Move point to the first non-whitespace character on this line. This non-interactive version of (back-to-indentation) should not be advised (defalias 'ess-back-to-indentation #[nil "\300\301!\210\302\303\304 \"\210\305 \207" [beginning-of-line 1 skip-syntax-forward " " line-end-position backward-prefix-chars] 3 (#$ . 1219)]) (defalias 'ess-save-excursion-when-nil '(macro . #[(&rest body) "\301\302\303\304BC\305BBE\207" [body let ((orig-point (point))) cond progn ((t (prog1 nil (goto-char orig-point))))] 5])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ess-save-excursion-when-nil lisp-indent-function 0 put edebug-form-spec (&rest form)] 5) #@66 Like `while' for TEST but return t when BODY gets executed once. (defalias 'ess-while '(macro . #[(test &rest body) "\302\303\304\305 BBB\306BBB\207" [test body let (executed) while (setq executed t) (executed)] 6 (#$ . 1894)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ess-while lisp-indent-function 1 put edebug-form-spec (&rest form)] 5) (defalias 'ess-at-indent-point '(macro . #[(&rest body) "\301\302\303\304BF\207" [body save-excursion (goto-char indent-point) (ess-back-to-indentation) progn] 5])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ess-at-indent-point lisp-indent-function 0 put edebug-form-spec (&rest form)] 5) (defalias 'ess-at-containing-sexp '(macro . #[(&rest body) "\301\302\303BE\207" [body save-excursion (goto-char containing-sexp) progn] 4])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ess-at-containing-sexp lisp-indent-function 0 put edebug-form-spec (&rest form)] 5) #@173 Evaluate all arguments and return non-nil if one of the arguments is non-nil. This is useful to trigger side-effects. FORMS follows the same syntax as arguments to `cond'. (defalias 'ess-any '(macro . #[(&rest forms) "\301\300\302\303\304\"BDC\305BB\207" [forms let list mapcar #[(form) "\301B\207" [form progn] 2] ((cl-some 'identity (mapcar 'eval forms)))] 6 (#$ . 2873)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ess-any lisp-indent-function 0 put edebug-form-spec nil] 5) (defalias 'ess-char-syntax #[(string) "\301\302!z!\207" [string char-to-string string-to-char] 3]) (defalias 'ess-token-type #[(token) "@@\207" [token] 1]) (defalias 'ess-token-value #[(token) "@A\207" [token] 1]) (defalias 'ess-token-start #[(token) "A@@\207" [token] 1]) (defalias 'ess-token-end #[(token) "A@A\207" [token] 1]) (defalias 'ess-token-refined-type #[(token) "\301\302!!\207" [token ess-token-type ess-refine-token] 3]) #@83 Return next TOKEN. Cons cell containing the token type and string representation. (defalias 'ess-token-after #[(&optional token) "\212\203\n\301!b\210\302 )\207" [token ess-token-end ess-jump-token] 2 (#$ . 3824)]) #@87 Return previous TOKEN. Cons cell containing the token type and string representation. (defalias 'ess-token-before #[(&optional token) "\212\203\n\301!b\210\302 )\207" [token ess-token-start ess-climb-token] 2 (#$ . 4048)]) (defalias 'ess-climb-token #[(&optional type string) "`\304 \210\305\306!\210\307 \206\310 \206\311u\210\312 \n\204! \203-\313 \n #\205. \202. )\2066\314b\210)\207" [orig-point token type string ess-escape-comment ess-skip-blanks-backward t ess-climb-token--back ess-climb-token--back-and-forth -1 ess-token-after ess-token= nil] 4]) (defalias 'ess-token--cons #[(type value) "\302=\203 C\207 B\207" [type value self] 2]) (defalias 'ess-climb-token--back #[nil "``eU\203\f\303\202\304 \305`\" \205 \306 \n\"`BD+\207" [token-end token-type token-value "buffer-start" ess-climb-token--operator buffer-substring-no-properties ess-token--cons] 3]) (defalias 'ess-climb-token--char #[(&rest chars) "\302 \203`Sf @=\203\303 \203\304 A\211\204)\207" [executed chars nil ess-backward-char t] 3]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put ess-climb-token--char speed -1 put byte-optimizer byte-compile-inline-expand] 5) (defalias 'ess-climb-token--operator #[nil "`Sf\211\303\267\202\203\304 \202\204\304 \305C\306 \2031`Sf @=\2031\304 \2031\307 A\211\204\n*\204\204\310C\306 \203V`Sf @=\203V\304 \203V\307 A\211\204?\n*\204\204\311C\306 \203{`Sf @=\203{\304 \203{\307 A\211\204d\n*\204\204\312C\306 \203\240`Sf @=\203\240\304 \203\240\307 A\211\204\211\n*\204\204\313C\306 \203\305`Sf @=\203\305\304 \203\305\307 A\211\204\256\n*\210\202\204\304 \306fC\306 \203\356`Sf @=\203\356\304 \203\356\307 A\211\204\327\n*\210\202\204\304 \202\204\304 \314C\306 \203`Sf @=\203\304 \203\307 A\211\204\n*\204\204\315\316`\317Z\"\203\204`\317Zb\210\202\204\304 \313\211D\306 \203T`Sf @=\203T\304 \203T\307 A\211\204=\n*\210\202\204\304 \311\211D\306 \203}`Sf @=\203}\304 \203}\307 A\211\204f\n*\210\202\204\306)\205\211\320\207" [#1=#:val chars executed #s(hash-table size 16 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (33 10 63 10 126 10 94 10 47 10 43 10 61 15 36 203 64 203 42 203 124 203 38 203 60 244 62 249 45 305 58 346)) ess-backward-char 61 nil t 33 58 62 60 45 looking-back "->" 2 self] 6]) (defalias 'ess-climb-token--back-and-forth #[nil "`\301 \205\214`}\210\302 ))\207" [limit ess-skip-token-backward ess-token-after] 2]) (defalias 'ess-skip-token-backward #[nil "``Sf\302>\203\303 \202S`Sfz\304>\203\305 \202S`Sfz\306>\203M\303 `\307f\310 \210`Sf\311>\205= `Sf=)\203F\303 \204Ib\210)\202S\312\313!\314U?\206Z\307b\210)\207" [orig-point current-delim (44 59) ess-backward-char (34 36) ess-backward-sexp (40 41) nil ess-skip-blanks-backward (91 93) skip-syntax-backward "w_" 0] 3]) #@151 Consume a token forward. Return a cons cell containing the token type and the token string content. Return nil when the end of the buffer is reached. (defalias 'ess-jump-token #[(&optional type string) "`\306\307!\210`\310 \206 \311 \206 \312 \206 \313 \206 \314u\210\315\316 `\"\317\n \" `BD \2048\203E\320\f #\205F\f\202F\f,\206N\314b\210)\207" [orig-point token-start token-type token-value token type ess-skip-blanks-forward t ess-jump-token--regexps ess-jump-token--literal ess-jump-token--infix-op ess-jump-token--punctuation nil "unknown" buffer-substring-no-properties ess-token--cons ess-token= string] 4 (#$ . 6952)]) (defalias 'ess-jump-token--literal #[nil "\300\301!\203 \302 \210\303\207\300\304!\204\305f\306=\203\302 \210\307\207\305f\310>\205(\302 \210\311\207" [looking-at "[0-9]" ess-forward-sexp "number" "\\sw\\|\\s_" nil 96 "identifier" (34 39) "string"] 2]) (defalias 'ess-jump-token--punctuation #[nil "`dU\203\301\207\302f\211\303\267\202#\302u\210\304\202$\302u\210\305\306!\210\307\202$\302)\207" [#1=#:val "buffer-end" nil #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (59 17 44 24)) self ess-skip-blanks-forward t ","] 3]) (defvar ess-r-prefix-keywords-list '("if" "for" "while" "function")) (defvar ess-r-keywords-list (append ess-r-prefix-keywords-list '("else"))) (defvar ess-r-delimiters-list '("(" ")" "{" "}" "[" "]" "[[" "]]")) (defvar ess-r-operators-list '("+" "-" "*" "/" "%%" "**" "^" "&" "&&" "|" "||" "!" "?" "~" "==" "!=" "<" "<=" ">=" ">" "=" "<-" "<<-" "->" "->>" "$" "@" ":" "::" ":::" ":=")) (defvar ess-r-keywords-re (byte-code "\301!\302P\207" [ess-r-keywords-list regexp-opt "\\_>"] 2)) (defvar ess-r-delimiters-re (regexp-opt ess-r-delimiters-list)) (defvar ess-r-operators-re (regexp-opt ess-r-operators-list)) (defalias 'ess-jump-token--regexps #[nil "\303!\204\303 !\204\303\n!\205\304\225b\210\305\207" [ess-r-keywords-re ess-r-delimiters-re ess-r-operators-re looking-at 0 self] 2]) (defalias 'ess-jump-token--infix-op #[nil "\301!\203\f\302\225b\210\303\207\304f\305=\205\306 \210\307\207" [ess-r-operators-re looking-at 0 self nil 37 ess-forward-sexp "%infix%"] 2]) (defalias 'ess-escape-token #[nil "\300 \210\301 \210\302 \206B\303\304 !\203\305\306\307\310\"\210\206B\311\312!\206B\311\313!\2031`Sfz\314>?\206B\315\316!\210\317\304 !\206B\315\320!\321U?\207" [ess-escape-comment ess-skip-blanks-forward ess-escape-string ess-token-delimiter-p ess-token-after t mapc #[(delims) "\301\302\"\205`Sf\303@!=\205\304 \210\202\207" [delims ess-token-after= nil string-to-char ess-backward-char] 3] (("[" "[[") ("]" "]]")) ess-token-after= ("," ";") "identifier" (119 95) skip-syntax-backward "." ess-token-operator-p "w_" 0] 4]) (defalias 'ess-refine-token #[(token) "\304!\211\305\267\202\236\212\306!b\210\307 \211\2056\212\nb\210\310\311!\205$\312\313!)\2056\212\314 \2051\312\315!)\2056\316*\202\237\317\320 \316\"\204H\310\311!\205\237\321\202\237\212\322!\203[\323\324\"\210\202`\306!b\210\325\326 !\205h\327)\206\237\330\331\"\205\237\212\323\331\"\210\312\332!\205\200\333)\202\237\212\323\334\"\204\221\306!b\210\317\326 \327\"\205\232\327)\202\237\324)\211\203\261 \335!BA@D\202\262)\207" [token #1=#:val containing-sexp refined-type ess-token-type #s(hash-table size 6 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("=" 10 "string" 58 ")" 76 "(" 76 "}" 132 "{" 132)) ess-token-start ess-containing-sexp-position ess-token-after= "(" ess-token-before= ("identifier" "string") ess-climb-token ("," "(") "param-assign" ess-refined-token= ess-token-after "identifier" ess-token-close-delimiter-p ess-climb-paired-delims nil ess-token-keyword-p ess-token-before "prefixed-expr-delimiter" ess-token= ")" ("identifier" "string" ")" "]" "]]" "}") "argslist-delimiter" "}" ess-token-value] 4]) (defalias 'ess-token-balancing-delim #[(token) "\302!\211\303\267\202\"\304\202#\305\202#\306\202#\307\202#\310\202#\311\202#\312)\207" [token #1=#:val ess-token-type #s(hash-table size 6 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("(" 10 ")" 14 "[" 18 "]" 22 "[[" 26 "]]" 30)) ")" "(" "]" "[" "]]" "[[" nil] 3]) (defalias 'ess-token= #[(token &optional type string) "\204\f \204\f\303\304!\210;\203C\202 ;\203! C\202\" \211\2030\305\n!\235\2021\306\205A \203@\307\n! \235\202A\306*\207" [type string token error "No condition supplied" ess-token-type t ess-token-value] 3]) (defalias 'ess-refined-token= #[(token type &optional string) "\303\304! \n#\207" [token type string ess-token= ess-refine-token] 4]) (defalias 'ess-token-after= #[(type &optional string) "\302\303  #\207" [type string ess-token= ess-token-after] 4]) (defalias 'ess-token-before= #[(type &optional string) "\302\303  #\207" [type string ess-token= ess-token-before] 4]) (defalias 'ess-token-open-delimiter-p #[(token) "\301\302!!\303\230\207" [token ess-char-syntax ess-token-type "("] 3]) (defalias 'ess-token-close-delimiter-p #[(token) "\301\302!!\303\230\207" [token ess-char-syntax ess-token-type ")"] 3]) (defalias 'ess-token-delimiter-p #[(token) "\301!\206 \302!\207" [token ess-token-open-delimiter-p ess-token-close-delimiter-p] 2]) (defalias 'ess-token-operator-p #[(token &optional strict) "\303! \235\204\303!\304\230\205\n?\206\305\306\"?\207" [token ess-r-operators-list strict ess-token-type "%infix%" ess-refined-token= "param-assign"] 3]) (defalias 'ess-token-keyword-p #[(token) "\302! \235\207" [token ess-r-keywords-list ess-token-type] 2]) (defalias 'ess-token-make-hash #[(&rest specs) "\302\303\304\"\305\306 \"\210)\207" [table specs make-hash-table :test equal mapc #[(spec) "A<\203 \301\302\"\207\301\303@\"\207" [spec mapc #[(cell) "\302@A #\207" [cell table puthash] 4] #[(token) "\303 A\n#\207" [token spec table puthash] 4]] 3]] 3]) (defvar ess-token-r-powers-delimiters '(("(" . 100) ("[" . 100) ("[[" . 100))) (defvar ess-token-r-powers-operator '(("?" . 5) ("else" . 8) ("<-" . 10) ("<<-" . 10) ("=" . 15) ("->" . 20) ("->>" . 20) ("~" . 25) ("|" . 30) ("||" . 30) ("&" . 35) ("&&" . 35) ("!" . 40) ("<" . 45) (">" . 45) ("<=" . 45) (">=" . 45) ("==" . 45) ("+" . 50) ("-" . 50) ("*" . 55) ("/" . 55) ("%infix%" . 60) (":" . 65) ("^" . 70) ("$" . 75) ("@" . 75) ("::" . 80) (":::" . 80))) (defvar ess-token-r-power-table (ess-token-make-hash ess-token-r-powers-operator ess-token-r-powers-delimiters)) (defvar ess-token-r-right-powers-operator '((")" . 1))) (defvar ess-token-r-right-power-table (ess-token-make-hash ess-token-r-powers-operator ess-token-r-right-powers-operator)) (defvar ess-token-r-nud-table (ess-token-make-hash '(("identifier" . identity) ("literal" . identity) ("number" . identity) ("function" . identity) ("if" . identity) ("while" . identity) ("for" . identity)) '(("(" . ess-parser-nud-block) ("{" . ess-parser-nud-block)))) (defvar ess-token-r-rnud-table (ess-token-make-hash '(("identifier" . identity) ("literal" . identity) ("number" . identity)) '((")" . ess-parser-rnud-paren) ("}" . ess-parser-nud-block)))) (defvar ess-token-r-leds-operator (byte-code "\301\302\"\303B\207" [ess-r-operators-list append ("%infix%" "else") ess-parser-led-lassoc] 4)) (defvar ess-token-r-leds-delimiter '(("(" . ess-parser-led-funcall) ("[" . ess-parser-led-funcall) ("[[" . ess-parser-led-funcall))) (defvar ess-token-r-led-table (ess-token-make-hash ess-token-r-leds-operator ess-token-r-leds-delimiter)) (defvar ess-token-r-rid-table (ess-token-make-hash '((")" . ess-parser-rid-expr-prefix)))) (defalias 'ess-parser-nud-block #[(prefix-token) "\302CC\303\304 \"\210\305\306C\307 !`B D#)\207" [right prefix-token "TODO" ess-parser-advance-pair nil ess-node "block" ess-token-start] 5]) (defalias 'ess-parser-led-lassoc #[(start infix-token) "\304!\305 !\306\307C\310 !`B \nE#*\207" [infix-token power end start ess-parser-power ess-parse-expression ess-node "binary-op" ess-parser-token-start] 6]) (defalias 'ess-parser-led-funcall #[(left infix-token) "\306\307\310 \"\"\2059\311\n!\312 \n\"\306 \"\203\313\202\314\211\313\230\203,\f\315\316!D\317 C\320!`B\fD#+\207" [left ess-r-prefix-keywords-list infix-token power right type ess-token= append ("identifier" "string" "node") ess-parser-power ess-parse-arglist "prefixed-expr" "funcall" ess-parse-expression 0 ess-node ess-parser-token-start] 6]) (defalias 'ess-parser-rid-expr-prefix #[(right suffix-token) "\302\303\"\205 \304 \"\207" [suffix-token right ess-refined-token= "prefixed-expr-delimiter" ess-parser-rnud-paren] 3]) (defalias 'ess-parser-rnud-paren #[(suffix-token &optional prefixed-expr) "\212\306\307\")\310 !\311\n\"\f\203\312 \202\313\n!\f\203%\314\202. \203-\315\202.\316\f\203;\f@ D\241\210\317C\320!`B\f\203O\f E\202R D#-\207" [suffix-token infix-token power args prefixed-expr left ess-parser-advance-pair nil ess-parser-power ess-parse-arglist ess-parser-advance ess-parse-expression "prefixed-expr" "funcall" "enclosed-expr" ess-node ess-parser-token-start type] 6]) (defalias 'ess-parser-advance #[(&optional type value) "\303\300!\203\203\304 \n\"\207\305 \n\"\207" [ess-parser--backward type value boundp ess-climb-token ess-jump-token] 3]) (defalias 'ess-parser-advance-pair #[(&optional type token) "\303\300!\203\203\304 \n\"\207\305 \n\"\207" [ess-parser--backward type token boundp ess-climb-paired-delims ess-jump-paired-delims] 3]) (defalias 'ess-parser-next-token #[nil "\301\300!\203 \203 \302 \207\303 \207" [ess-parser--backward boundp ess-token-before ess-token-after] 2]) (defalias 'ess-parser-token-start #[(token) "\302\300!\203\203\303 !\207\304 !\207" [ess-parser--backward token boundp ess-token-end ess-token-start] 2]) (defalias 'ess-parser-power #[(token) "\304\300!\203\203\305\306 !\n\"\202\305\306 ! \"\206\307\207" [ess-parser--backward token ess-token-r-right-power-table ess-token-r-power-table boundp gethash ess-token-type 0] 3]) (defalias 'ess-node #[(type pos contents) "\304\300!\203\203 A @B\202 \304\300!\203\"\203\"\n\237\202#\n \nE*\207" [ess-parser--backward pos contents type boundp] 3]) (byte-code "\300\301\302\"\210\300\303\304\"\207" [defalias ess-node-start ess-token-start ess-node-end ess-token-end] 3) (defalias 'ess-parse-start-token #[(token) "\306\300!\203\203 \202\n\307\310\f! \"\311 !\205 \f!*\207" [ess-parser--backward ess-token-r-rnud-table ess-token-r-nud-table table token nud boundp gethash ess-token-type fboundp] 3]) (defalias 'ess-parse-infix-token #[(infix-token left) "\306!\307\301!\203 \203\310\311!\n\"\206\310\311! \"\f\n\"*\207" [infix-token ess-parser--backward ess-token-r-rid-table ess-token-r-led-table led infix-power ess-parser-power boundp gethash ess-token-type left] 4]) (defalias 'ess-parse-expression #[(&optional power) "\305\306 !\206 \307\310 `\311\211\f\2036\312 !W\2036\306 \210\313 \f\"\211\2030`\f\310 \202\nb\210 -\207" [power last-success last-sucessful-pos next current ess-parse-start-token ess-parser-advance 0 ess-parser-next-token nil ess-parser-power ess-parse-infix-token] 6]) (defalias 'ess-parse-arglist #[(power start-token) "``C\306!\307\310 \211\203/\311\312C\f`B C# B\211\203/\313\314!\203/`\202 \313\n! B\311\315C `SB \237#-\207" [start-token expr closing-delim arglist arg-start-pos start-pos ess-token-balancing-delim nil ess-parse-expression ess-node "arg" ess-parser-advance "," "arglist"] 5]) (defalias 'forward-ess-r-expr #[nil "`\301 \210\302 \206\303b\210)\207" [orig-point ess-escape-token ess-parse-expression nil] 2 nil nil]) (defalias 'forward-ess-r-sexp #[nil "`\304 \210\305 \306 \307 \n\"\211\205\310 !b\210 +\206\"\311b\210)\207" [orig-point orig-token tree sexp-node ess-escape-token ess-token-after ess-parse-expression ess-parser-tree-assoc ess-token-end nil] 4 nil nil]) (defalias 'backward-ess-r-expr #[nil "\301\302 )\207" [ess-parser--backward t ess-parse-expression] 1 nil nil]) (defalias 'backward-ess-r-sexp #[nil "\300\301!\207" [error "Todo"] 2 nil nil]) (defalias 'ess-parser-tree-assoc #[(key tree) "\306\211\211\211\203` \204`\f\307=\203\n\210\nA\202V\310\f8\203L\307 B\310\f8\306\211 \203D @\211 B A\211 \2043*\f\nB\202V\f\n\232\203V\n@ \211A\242\211\204\f ,\207" [tree result last-node stack next node nil node-end 2 --dolist-tail-- key] 5]) #@60 Return non-nil if point is in a function or indexing call. (defalias 'ess-inside-call-p #[(&optional call) "\302\300!\203\n\206\f\303 \212\304!\305 \210\2050\212\306u\210\307 )\2050\310\311!\204-\312\313!\2050\314 !*\207" [containing-sexp call boundp ess-containing-sexp-position ess-goto-char ess-climb-chained-delims nil ess-up-list ess-behind-call-opening-p "(" looking-at "\\[" ess-inside-call-name-p] 2 (#$ . 19418)]) (defalias 'ess-inside-continuation-p #[nil "\300\301!\206 \302\303!?\205-\212\304 \210\305 ?\205\306 )\206-\212\307 \210\310 \210\306 \205,\305 ?)\207" [looking-at "," ess-behind-call-opening-p "[[(]" ess-jump-object ess-ahead-param-assign-p ess-behind-operator-p ess-climb-object ess-climb-operator] 2]) (defalias 'ess-inside-call-name-p #[(&optional call) "\212\301!)\207" [call ess-climb-call-name] 2]) #@237 Return non-nil if point is in a prefixed block. Prefixed blocks refer to the blocks following function declarations, control flow statements, etc. If CALL is not nil, check if the prefix corresponds to CALL. If nil, return the prefix. (defalias 'ess-inside-prefixed-block-p #[(&optional call) "\212\301!)\207" [call ess-escape-prefixed-block] 2 (#$ . 20270)]) #@78 Skip blanks and newlines backward, taking end-of-line comments into account. (defalias 'ess-skip-blanks-backward #[(&optional newlines) "\303 \205&\304`eU\204$`\305 U\203$\306\307y\210\310 b\210\303 \210\202 )D\311\312\313\314\n\"\")\207" [newlines executed forms ess-skip-blanks-backward-1 nil line-beginning-position t -1 ess-code-end-position cl-some identity mapcar eval] 5 (#$ . 20638)]) (defalias 'ess-skip-blanks-backward-1 #[nil "`eU?\205 \300\301!\302U?\207" [skip-syntax-backward " " 0] 2]) #@77 Skip blanks and newlines forward, taking end-of-line comments into account. (defalias 'ess-skip-blanks-forward #[(&optional newlines) "\304\305!\306U?\307 \2035`\310 U\2035``\307y\210\311 \210`\nV)\206(\307\nb\210)\2035\312\307w\210\313\202)D\314\315\316\317 \"\")\207" [executed newlines orig-point forms skip-syntax-forward " " 0 nil ess-code-end-position ess-back-to-indentation " " t cl-some identity mapcar eval] 5 (#$ . 21155)]) (defalias 'ess-jump-char #[(char) "`\302\303!\210\304 !\203\305\225b\206\306b\210)\207" [orig-point char ess-skip-blanks-forward t looking-at 0 nil] 2]) (defalias 'ess-escape-comment #[nil "\300 \205 \301 \302\303x\210\207" [ess-inside-comment-p comment-beginning "#+[ ]*" nil] 3]) (defalias 'ess-ahead-closing-p #[nil "`Sf\300>\207" [(93 125 41)] 2]) (defalias 'ess-ahead-boundary-p #[nil "\300\301`S\"\207" [looking-back "[][ \n(){},]"] 3]) (defalias 'ess-escape-string #[nil "\300\301 8\205 \302\303\301 8!\207" [3 syntax-ppss ess-goto-char 8] 3]) (defalias 'ess-climb-paired-delims #[(&optional type token) "` \206\303 \304 !b\210\n\203\305 \n\"\202\306 !\205&\307 \205&\310 )\206.\311b\210)\207" [orig-point token type ess-token-before ess-token-end ess-token= ess-token-delimiter-p ess-backward-sexp ess-token-after nil] 3]) (defalias 'ess-jump-paired-delims #[(&optional type token) "` \206\303 \304 !b\210\n\203\305 \n\"\202\306 !\205&\307 \205&\310 )\206.\311b\210)\207" [orig-point token type ess-token-after ess-token-start ess-token= ess-token-delimiter-p ess-forward-sexp ess-token-before nil] 3]) (defalias 'ess-block-opening-p #[nil "\212\300\301!\206 \302 \206 \303)\207" [looking-at "{" ess-behind-block-paren-p nil] 2]) (defalias 'ess-block-closing-p #[nil "\212\301\302!\206\301\303!\205\304u\210\305 \210\306\307P\310 \"?)\207" [ess-r-name-pattern looking-at "}" ")" nil backward-sexp looking-back "[[:blank:]]*" line-beginning-position] 3]) (defalias 'ess-block-p #[nil "\212\205\nb\210\301 )\206\302 \207" [containing-sexp ess-block-opening-p ess-unbraced-block-p] 1]) (defalias 'ess-behind-block-paren-p #[nil "\300\301!\205 \302 ?\207" [looking-at "(" ess-ahead-attached-name-p] 2]) (defalias 'ess-climb-block #[(&optional ignore-ifelse) "` \204\f\302\303!\206$`Sf\304=\203 \305u\210\306\305!\307 \210\206$\310b\210)\207" [orig-point ignore-ifelse ess-climb-if-else to-start 125 -1 ess-up-list ess-climb-block-prefix nil] 2]) (defvar ess-prefixed-block-patterns (mapcar #[(fun) "\301P\207" [fun "[ \n]*("] 2] '("function" "if" "for" "while"))) (defalias 'ess-behind-prefixed-block-p #[(&optional call) "\203\n\302\303P!\207\304\302 \"\207" [call ess-prefixed-block-patterns looking-at "[ ]*(" cl-some] 3]) #@177 This indicates whether point is in front of an unbraced prefixed block following a control flow statement. Returns position of the control flow function (if, for, while, etc). (defalias 'ess-unbraced-block-p #[(&optional ignore-ifelse) "\212\302 \2052\303\304!\203\2031\303\305!\2052\302 \2052\306\303 \"\2052\203-\303\307!?\202.\310\2052`)\207" [ignore-ifelse ess-prefixed-block-patterns ess-backward-sexp looking-at "else\\b" "(" cl-some "if\\b" t] 3 (#$ . 23899)]) #@328 Climb the prefix of a prefixed block. Prefixed blocks refer to the blocks following function declarations, control flow statements, etc. Should be called either in front of a naked block or in front of the curly brackets of a braced block. If CALL not nil, check if the prefix corresponds to CALL. If nil, return the prefix. (defalias 'ess-climb-block-prefix #[(&optional call ignore-ifelse) "` \204 \304 \205\n?\206\305\n!\306\307!\203\310\311!\210\206a\312 !\313 !\205Y\n\2034\305\n!\202Y\305\314!\203>\314\202Y\305\315!\203H\315\202Y\305\316!\203R\316\202Y\305\307!\205Y\307)\206a\317b\210)\207" [orig-point ignore-ifelse call pos ess-climb-if-else-call looking-at ess-token-after= "else" ess-climb-token "}" ess-unbraced-block-p ess-goto-char "function" "for" "if" nil] 3 (#$ . 24386)]) #@36 Climb outside of a prefixed block. (defalias 'ess-escape-prefixed-block #[(&optional call) "\303\300!\203\n\206\f\304 `\305!\203!\306\307!\203!\310\n!\206%\311 b\210)\206,\312\n!)\207" [containing-sexp orig-point call boundp ess-containing-sexp-position ess-goto-char looking-at "{" ess-climb-block-prefix nil ess-escape-unbraced-block] 2 (#$ . 25207)]) (defalias 'ess-escape-unbraced-block #[(&optional call) "`\302 \204\303 \204\304 \204\305 !\206\306b\210)\207" [orig-point call ess-unbraced-block-p ess-escape-continuations ess-escape-call ess-climb-block-prefix nil] 2]) (defalias 'ess-jump-block #[nil "\300 \206\301 \203 \302 \207\303\304!\204\305 \205\306 \207" [ess-jump-if-else ess-behind-prefixed-block-p ess-jump-prefixed-block looking-at "{" ess-behind-block-paren-p ess-forward-sexp] 2]) (defalias 'ess-jump-prefixed-block #[(&optional call) "`\302 !\203#\303\304!\210\305\306!\210\307\310!\203\303 \202 \311 \312 \210\206'\313b\210)\207" [orig-point call ess-behind-prefixed-block-p ess-forward-sexp 2 ess-skip-blanks-forward t looking-at "{" ess-jump-expression ess-jump-continuations nil] 2]) (defalias 'ess-call-closing-p #[nil "\212\300\301!\203 \302\303!\202\300\304!\205\"\302\303!\205\"\305\306 \210\205\"\307 )\207" [looking-at ")" ess-up-list -1 "]" t ess-climb-chained-delims ess-ahead-attached-name-p] 2]) (defalias 'ess-behind-call-opening-p #[(pattern) "\301!\205\302 \207" [pattern looking-at ess-ahead-attached-name-p] 2]) (defalias 'ess-ahead-attached-name-p #[nil "\212\300 )\207" [ess-climb-object] 1]) #@90 Return non-nil if looking at a function argument. To be called just before the `=' sign. (defalias 'ess-ahead-param-assign-p #[nil "\300\301 \302\"\207" [ess-refined-token= ess-token-before "param-assign"] 3 (#$ . 26792)]) (defalias 'ess-behind-arg-p #[nil "\212\300 )\207" [ess-jump-arg] 1]) (defalias 'ess-behind-parameter-p #[nil "\212\300 )\207" [ess-jump-parameter] 1]) (defalias 'ess-jump-parameter #[nil "`\301 \203\302\303!\203\304\224b\210\305 \210\306\202\307b\210)\207" [orig-point ess-jump-name looking-at "[ ]*=\\([^=]\\)" 1 ess-skip-blanks-forward t nil] 2]) (defalias 'ess-jump-arg #[nil "`\302\303!\210\304 \305 \306 E\307\310\311\312 \"\")\206\313b\210)\207" [orig-point forms ess-skip-blanks-forward t ess-jump-parameter ess-jump-expression ess-jump-continuations cl-some identity mapcar eval nil] 5]) #@44 Should be called in front of the argument. (defalias 'ess-arg-bounds #[nil "\212`\301 \205 `D*\207" [beg ess-jump-arg] 2 (#$ . 27632)]) #@62 Climb functions (e.g. ggplot) and parenthesised expressions. (defalias 'ess-climb-call #[(&optional call) "\303`\304 \210\305\306!\203`Sf\307=\203\310 \202\304 \206#\303 b\210)\203,\311\202)\206Y``Sf\312>\203T\313 \203T\n\203M\304 \203M\314\n!\210\311\304 \210\206X\303 b\210)\207" [executed orig-point call nil ess-climb-name ess-climb-chained-delims 93 41 ess-climb-call t (93 41 125) ess-backward-sexp looking-at] 2 (#$ . 27777)]) (defalias 'ess-climb-call-name #[(&optional call) "`\302 \210\303 \210\304\305!\203\306 \203 ?\206\"\307 !\206\"\310b\210)\207" [orig-point call ess-jump-name ess-skip-blanks-forward ess-behind-call-opening-p "[[(]" ess-climb-name looking-at nil] 2]) (defalias 'ess-step-to-first-arg #[nil "\301 \302 \203b\210\303u\210\304\202!\305 \205!\306 \210\307 \210\303u\210\304)\207" [containing-sexp ess-containing-sexp-position ess-inside-call-p nil t ess-inside-call-name-p ess-jump-name ess-skip-blanks-forward] 1]) (defalias 'ess-jump-to-next-arg #[nil "\300 \205\f\301\302!\303\304!\210\207" [ess-jump-arg ess-jump-char "," ess-skip-blanks-forward t] 3]) (defalias 'ess-jump-call #[nil "`\301 \203%`Sf\302=\2064\303\304!\203\305 \202\"\303\306!\203%\307 \2064\303\310!\2030\307 \2064\311b\210)\207" [orig-point ess-jump-object 41 looking-at "\\[" ess-jump-chained-brackets "(" ess-forward-sexp "[ ]*(" nil] 2]) (defalias 'ess-behind-call-p #[nil "\212\300 \210\301 \210\302\303!)\207" [ess-jump-object ess-skip-blanks-forward looking-at "[[(]"] 2]) #@57 Should be called with point between delims, e.g. `]|['. (defalias 'ess-climb-chained-delims #[(&optional delim) "\203 C\202\n\303\304``Sf>\203\305 \206 \304\nb\210)\203)\306\202 )\207" [delim executed orig-point (93 41) nil ess-backward-sexp t] 2 (#$ . 29312)]) (defalias 'ess-jump-chained-brackets #[nil "\302`\302f\303=\203\304 \206\302 b\210)\203\305\202)\207" [executed orig-point nil 91 ess-forward-sexp t] 2]) (defalias 'ess-escape-call #[(&optional call) "\304 \305 \203(`b\210\306 \210\307 \203 \n?\206$\310\n!\206$\311 b\210)\202S``\312 \205J\310\313!\205J\307 \205J\n\203F\310\n!\205J` U?)\206R\311 b\210))\207" [containing-sexp orig-point call orig-pos ess-containing-sexp-position ess-inside-call-p ess-climb-chained-delims ess-climb-name looking-at nil ess-jump-name "[[(]"] 2]) (defalias 'ess-escape-calls #[nil "\301\302 \203\f\303\202)\207" [executed nil ess-escape-call t] 1]) (defalias 'ess-jump-inside-call #[nil "`\301 \203\302 \210\303\304!\203\305u\210\306\202\305b\210)\207" [orig-point ess-jump-name ess-skip-blanks-forward looking-at "(" nil t] 2]) (defalias 'ess-args-bounds #[(&optional marker) "\305 \306 \2058\212T\212b\210\307 \210`)\211b\2057\310 \2057\311\312u\210\2057 \2030\313 \2021`\n\f E)+)\207" [containing-sexp call-beg beg marker end ess-containing-sexp-position ess-inside-call-p ess-climb-name ess-up-list t -1 point-marker] 4]) #@161 Return all arguments as an alist with cars set to argument names and cdrs set to the expressions given as argument. Both cars and cdrs are returned as strings. (defalias 'ess-args-alist #[nil "\212\302 \205!\303\211\304 \211\203 C\244\211\203\305 \204\n *)\207" [current-arg args ess-step-to-first-arg nil ess-cons-arg ess-jump-to-next-arg] 2 (#$ . 30759)]) #@142 Return a cons cell of the current argument with car set to the parameter name (nil if not specified) and cdr set to the argument expression. (defalias 'ess-cons-arg #[nil "\212\302\303!\210\304 \205\305`\306 \210`\307\310!\210\302 \210\"\305`\311 \210`\"\211+B\207" [arg param ess-skip-blanks-forward t ess-behind-parameter-p buffer-substring-no-properties ess-jump-name ess-jump-char "=" ess-jump-arg] 6 (#$ . 31135)]) (defalias 'ess-behind-operator-p #[(&optional strict) "\301\302 \"\207" [strict ess-token-operator-p ess-token-after] 3]) (defalias 'ess-ahead-operator-p #[(&optional strict) "\301\302 \"\207" [strict ess-token-operator-p ess-token-before] 3]) (defalias 'ess-climb-lhs #[(&optional no-fun-arg climb-line) "`\304 \305 \210\n\204\304 \232\205\306 !\205\307\310 \210)\206%\311b\210)\207" [orig-point start-line climb-line no-fun-arg line-number-at-pos ess-climb-operator ess-behind-definition-op-p t ess-climb-expression nil] 2]) (defalias 'ess-jump-lhs #[nil "`\301 \203\302 \203\303 \206\304b\210)\207" [orig-point ess-jump-name ess-behind-definition-op-p ess-jump-operator nil] 2]) (defalias 'ess-climb-operator #[nil "\300\301 !\205\f\302 \303 \210\207" [ess-token-operator-p ess-token-before ess-climb-token ess-skip-blanks-backward] 2]) (defalias 'ess-climb-unary-operator #[nil "`\302 \303 !\304\235)\206\305b\210)\207" [orig-point token ess-climb-token ess-token-type ("+" "-" "!" "?" "~") nil] 2]) (defalias 'ess-climb-continuations #[(&optional cascade ignore-ifelse) "\306 \307\310\311\312\313`\314\315\316\315\317\315\257\315\320 \311\"\321X\203[`\322 \2034\323 \f\324#\2034\325 !\2068\315 b\210)\204A\326 \203[\320 \313\"`U\204[\327\323 \f\315#\210\330 \313`#\210\202\n)\205\217\320 \314\"\203}\320 \311\"\331U\204w\320 \317\"\204}\320 \314\"b\210\320 \316\"\203\210\332\202\217\306 \320 \307\"W*\207" [start-line state executed orig-point cascade ignore-ifelse line-number-at-pos :start-line :last-line :moved 0 :last-pos :prev-point nil :def-op :expr plist-get 1 ess-climb-operator ess-climb-continuations--update-state op ess-climb-expression ess-climb-unary-operator t plist-put 3 def-op] 14]) (defalias 'ess-climb-continuations--update-state #[(state cascade &optional op) "\203 \304 \305\306 #\210\307 \310 \311\"\2039\n\310 \311\"W\2039 \204)\310 \305\"\2049\304 \312\310 \312\"T#\210\304 \311\n#\210)\204M\310 \312\"\313X\203M\304 \314`#\210\315 \203a\310 \312\"\313X\203a\304 \316\317#\210\317\207" [op state cur-line cascade plist-put :expr ess-ahead-closing-p line-number-at-pos plist-get :last-line :moved 1 :prev-point ess-behind-definition-op-p :def-op t] 6]) (defalias 'ess-jump-operator #[nil "\300 \205 \301 \210\302\303!\210\303\207" [ess-behind-operator-p ess-jump-token ess-skip-blanks-forward t] 2]) (defalias 'ess-jump-continuation #[nil "\300 \205\301 \207" [ess-jump-operator ess-jump-expression] 1]) (defalias 'ess-jump-continuations #[nil "\304\211\203`U\204`\211\203\305 \203\306\202 )\205L\307 `\310 \203?\311\306!\203?\307 \nU\204?\312 \206C\304 b\210)\203J\313 \210)\306)\207" [last-pos executed start-line orig-point nil ess-jump-continuation t line-number-at-pos ess-inside-call-p ess-skip-blanks-forward ess-behind-operator-p ess-jump-continuations] 3]) (defalias 'ess-ahead-continuation-p #[(&optional or-parameter) "\301\302 ?\"\206\212\303 )\206\304\305!\206\212\306 )\207" [or-parameter ess-token-operator-p ess-token-before ess-climb-block-prefix ess-token-after= "else" ess-climb-if-else-call] 3]) (defalias 'ess-token-definition-op-p #[(token strict) "\302\303\"\205 \203\304\305\"?\207\306\207" [token strict ess-token= ("<-" "<<-" ":=" "~" "=") ess-refined-token= "param-assign" t] 3]) (defalias 'ess-behind-definition-op-p #[(&optional strict) "\301\302 \"\207" [strict ess-token-definition-op-p ess-token-after] 3]) (defalias 'ess-ahead-definition-op-p #[(&optional strict) "\301\302 \"\207" [strict ess-token-definition-op-p ess-token-before] 3]) (defalias 'ess-behind-assignment-op-p #[nil "\301 \302\303\"\205\304\305\"?)\207" [token ess-token-after ess-token= ("<-" "=") ess-refined-token= "param-assign"] 3]) (defalias 'ess-escape-continuations #[nil "\302 ?\205\303 \304\305 \203\306\202\n)D\307\310\311\312 \"\")\207" [executed forms ess-ahead-boundary-p ess-climb-expression nil ess-climb-continuations t cl-some identity mapcar eval] 5]) (defalias 'ess-continuations-bounds #[(&optional marker) "\212`\304 \210`\205!\305 \210\306 \210\n\203\307 \202` )D+\207" [beg orig-point marker end ess-escape-continuations ess-jump-expression ess-jump-continuations point-marker] 2]) (defalias 'ess-climb-to-top-level #[nil "\300\301 !\204\302 \207" [ess-goto-char ess-containing-sexp-position ess-escape-continuations] 2]) #@36 Climb if, else, and if else calls. (defalias 'ess-climb-if-else-call #[(&optional multi-line) "`\303\304!\203-\305\306!\2033\307`\310 \305\311!\205\"\n\206\" \310 =)\204)b\210)\2020\305\311!\2067\312b\210)\207" [orig-point orig-line multi-line ess-climb-paired-delims ")" ess-climb-token "if" t line-number-at-pos "else" nil] 3 (#$ . 35972)]) (defalias 'ess-climb-if-else-body #[(&optional from-else) "`\302\303!\210`Sf\304=\203\303\305u\210\203\306\305!\206\307b\210)\206H \203G`\302\303!\210\310\311!\312\307\311\"\204<\313\307\311\"\210\206C\307b\210)\206H\307\207" [orig-point from-else ess-skip-blanks-backward t 125 -1 ess-up-list nil ess-climb-expression ignore-ifelse ess-climb-continuations ess-climb-block-prefix] 4]) #@84 Climb horizontal as well as vertical if-else chains, with or without curly braces. (defalias 'ess-climb-if-else #[(&optional to-start) "\303\304!?\205Q`\303\305!\306 !\205H\307\n!\205H\212 \205(\310\305!\205(\310\304!?)\203<\311\302!\210\312 \210\313\314\315\"\210\307\314!\210\316 \210\n\203G\311\n!\210\317)\206P\314b\210)\207" [orig-point from-else to-start ess-token-after= "if" "else" ess-climb-if-else-body ess-climb-if-else-call ess-jump-token ess-climb-if-else ess-climb-continuations ess-climb-block-prefix nil ignore-ifelse ess-maybe-climb-broken-else t] 3 (#$ . 36733)]) (defalias 'ess-maybe-climb-broken-else #[(&optional same-line) "` \205\303 \304\305!\205 \203\n\303 U\202\306)\206#\307b\210)\207" [orig-point same-line cur-line line-number-at-pos ess-climb-token "else" t nil] 2]) (defalias 'ess-skip-curly-backward #[nil "\300\301\302 \303#\207" [re-search-backward "}[ ]*" line-beginning-position t] 4]) (defalias 'ess-jump-if-else #[nil "\303\211`\304\305!\210\306=\204\307 \203\306\211\206>\310\311!\2036\312 \210\307 \2040\304\305!\210\313 \210\314\211\2027\303\206>\303\nb\210)\203G\305\202 *\207" [from executed orig-point nil ess-skip-blanks-forward t if ess-jump-if looking-at "else" ess-forward-sexp ess-jump-expression else] 3]) (defalias 'ess-jump-if #[nil "`\301\302!\210\303\304!\203\305\306!\203\301\302!\210\307 \206\310b\210)\207" [orig-point ess-skip-blanks-forward t looking-at "if[ \n]*(" ess-forward-sexp 2 ess-jump-expression nil] 2]) (defalias 'ess-behind-defun-p #[nil "\300\301!\206\302 \207" [looking-at "function[ ]*(" ess-behind-enclosed-defun-p] 2]) (defalias 'ess-behind-enclosed-defun-p #[nil "\212\300 \205\301 \205\302\303\304 \")\207" [ess-behind-call-p ess-jump-inside-call cl-some #[(arg) "\301\302A\"\207" [arg string-match "^function\\b"] 3] ess-args-alist] 3]) (defalias 'ess-climb-object #[nil "`\302\303 \210`Sf\304>\203\305 \203\306\202.\307\310\311\312\"\313\314!\315\302xD\"\203.\306\202`Sf\316>\203<\317u\210\320 \210 )\206E\302b\210)\207" [orig-point climbed nil ess-skip-blanks-backward (96 34 39) ess-backward-sexp t cl-some apply-partially /= 0 skip-syntax-backward "w_" "\"'" (36 64) -1 ess-climb-object] 5]) (defalias 'ess-climb-name #[nil "\300 \207" [ess-climb-object] 1]) (defalias 'ess-jump-object #[nil "\301 \206`\302\303w\210\303f\304>\206\303b\210)\205\305 \207" [orig-point ess-jump-name " " nil (34 39) ess-forward-sexp] 2]) (defalias 'ess-jump-name #[nil "`\305\211\306\305w\210\305f\307=\203!\310 `S\"\203!\305u\210\311\202]\305f\307=\203I\305u\210\305\305f\312>\204<\311\305u\210\202-\f)\203]\311\305u\210\202]\313\314!\315U\204]\305f\307=\203[\305u\210\311\n*\206f\305b\210)\207" [orig-point quote-char climbed ess-r-symbol-pattern executed nil " " 96 looking-back t (96 10) skip-syntax-forward "w_" 0] 3]) (defalias 'ess-climb-expression #[(&optional ignore-ifelse) "`\302 !\206\303 \206\304 \206\305b\210)\207" [orig-point ignore-ifelse ess-climb-block ess-climb-call ess-climb-object nil] 2]) (defalias 'ess-jump-expression #[nil "\300 \206\f\301 \206\f\302 \207" [ess-jump-block ess-jump-call ess-jump-object] 1]) (provide 'ess-r-syntax)