;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\305\306\307\"\207" [require ess-mode ess-help ess-utils ess-inf autoload speedbar-add-supported-extension "speedbar.el"] 3) #@26 Syntax table for S code. (defvar S-syntax-table (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\306#\210\302\310\306#\210\302\311\306#\210\302\312\306#\210\302\313\306#\210\302\314\306#\210\302\315\306#\210\302\316\317#\210\302\320\317#\210\302\321\322#\210\302\323\324#\210\302\325\326#\210\302\327\326#\210\302\330\326#\210\302\331\326#\210\302\332\326#\210\302\333\306#\210\302\312\306#\210\302\313\306#\210\302\334\306#\210)\207" [S-syntax-table make-syntax-table modify-syntax-entry 92 "\\" 43 "." 45 61 37 60 62 38 124 39 "\"" 34 35 "<" 10 ">" 46 "_" 36 64 95 58 42 47] 4) (#$ . 276)) #@44 General options for S and S+ source files. (defvar S-editing-alist '((paragraph-start concat "\\s-*$\\|" page-delimiter) (paragraph-separate concat "\\s-*$\\|" page-delimiter) (paragraph-ignore-fill-prefix . t) (require-final-newline . mode-require-final-newline) (indent-line-function quote ess-indent-line) (parse-sexp-ignore-comments . t) (ess-style . ess-default-style) (ess-mode-syntax-table . S-syntax-table) (add-log-current-defun-header-regexp . "^\\(.+\\)\\s-+<-[ \n]*function")) (#$ . 909)) #@66 S language expression for startup -- default for all S dialects. (defvar inferior-S-language-start '(concat "options(" "STERM='" ess-STERM "'" ", str.dendrogram.last=\"'\"" (if ess-editor (concat ", editor='" ess-editor "'")) (if ess-pager (concat ", pager='" ess-pager "', help.pager='" ess-pager "'")) ", show.error.locations=TRUE" ")") (#$ . 1417)) #@64 S-language common settings for all -customize-alist s (defconst S-common-cust-alist '((ess-language . "S") (inferior-ess-exit-command . "q()\n") (inferior-ess-language-start eval inferior-S-language-start) (comint-use-prompt-regexp . t) (comint-process-echoes . t) (inferior-ess-primary-prompt . "> ") (inferior-ess-secondary-prompt . "+ ") (comment-start . "#") (ess-imenu-generic-expression . ess-imenu-S-generic-expression) (comment-add . 1) (comment-start-skip . "#+ *") (comment-use-syntax . t) (comment-column . 40) (ess-no-skip-regexp concat "^ *@\\|" (default-value 'ess-no-skip-regexp)) (inferior-ess-prompt . inferior-S-prompt) (ess-get-help-topics-function function ess-s-get-help-topics-function) (ess-getwd-command . "getwd()\n") (ess-setwd-command . "setwd('%s')\n") (ess-funargs-command . ".ess_funargs(\"%s\")\n") (fill-nobreak-predicate quote ess-inside-string-p) (normal-auto-fill-function quote ess-do-auto-fill) (ess-execute-screen-options-command . "options(width=%d, length=99999)\n") (inferior-ess-font-lock-keywords quote inferior-S-font-lock-keywords) (ess-font-lock-keywords quote ess-S-font-lock-keywords) (font-lock-defaults quote (ess-build-font-lock-keywords nil nil ((46 . "w") (95 . "w"))))) (#$ . 1775)) #@49 Common settings for all S+<*>-customize-alist s (defconst S+common-cust-alist (append '((ess-suffix . "S") (ess-mode-syntax-table . S-syntax-table) (ess-help-sec-regex . ess-help-S+-sec-regex) (ess-help-sec-keys-alist . ess-help-S+sec-keys-alist) (ess-change-sp-regexp . ess-S+-change-sp-regexp) (ess-function-pattern . ess-s-function-pattern) (ess-function-template . " <- \n#\nfunction()\n{\n\n}\n") (ess-dump-filename-template replace-regexp-in-string "S$" ess-suffix ess-dump-filename-template-proto) (ess-traceback-command . "traceback()\n") (ess-mode-editing-alist . S-editing-alist) (ess-dumped-missing-re . "\\(\\(<-\\|=\\)\nDumped\n\\'\\)\\|\\(\\(<-\\|=\\)\\(\\s \\|\n\\)*\\'\\)") (ess-syntax-error-re . "\\(Syntax error: .*\\) at line \\([0-9]*\\), file \\(.*\\)$") (inferior-ess-objects-command . inferior-Splus-objects-command) (ess-describe-object-at-point-commands quote ess-S-describe-object-at-point-commands) (ess-editor . S-editor) (ess-pager . S-pager)) S-common-cust-alist) (#$ . 3027)) #@61 Alist of (key . string) pairs for use in section searching. (defconst ess-help-S+sec-keys-alist '((97 . "ARGUMENTS:") (98 . "BACKGROUND:") (66 . "BUGS:") (100 . "DESCRIPTION:") (68 . "DETAILS:") (101 . "EXAMPLES:") (110 . "NOTE:") (79 . "OPTIONAL ARGUMENTS:") (82 . "REQUIRED ARGUMENTS:") (114 . "REFERENCES:") (115 . "SEE ALSO:") (83 . "SIDE EFFECTS:") (117 . "USAGE:") (118 . "VALUE:")) (#$ . 4040)) #@32 Help section keys for S ver.3. (defconst ess-help-S3-sec-keys-alist '((97 . "ARGUMENTS:") (98 . "BACKGROUND:") (66 . "BUGS:") (100 . "DESCRIPTION:") (68 . "DETAILS:") (101 . "EXAMPLES:") (110 . "NOTE:") (114 . "REFERENCES:") (115 . "SEE ALSO:") (83 . "SIDE EFFECTS:") (117 . "USAGE:") (118 . "VALUE:")) (#$ . 4448)) #@27 Help section keys for S4. (defconst ess-help-S4-sec-keys-alist '((97 . "ARGUMENTS:") (98 . "BACKGROUND:") (66 . "BUGS:") (100 . "DESCRIPTION:") (68 . "DETAILS:") (101 . "EXAMPLES:") (110 . "NOTE:") (114 . "REFERENCES:") (115 . "SEE ALSO:") (83 . "SIDE EFFECTS:") (117 . "USAGE:") (118 . "VALUE:")) (#$ . 4770)) #@57 Reg(ular) Ex(pression) of section headers in help file. (defconst ess-help-S+-sec-regex "^[A-Z. ---]+:$" (#$ . 5087)) #@29 Indentation for S comments. (defalias 'S-comment-indent #[nil "\302\303!\204\302\304!\203\305 \306U\203i\207\302\307!\2031\310\311!\205#\311 \211<\203.@\202/)\207\312\313x\210n\203=\314\202?iT ]\207" [tem comment-column looking-at "###" "#!" line-number-at-pos 1 "##" fboundp ess-calculate-indent " " nil 0] 3 (#$ . 5211)]) #@117 Fix ess-mode buffer so that single-line comments start with at least '##', and ensure space before subsequent text. (defalias 'ess-fix-comments #[(&optional dont-query verbose) "\302\303\304\305$\210\302\306\307 $\207" [verbose dont-query ess-replace-regexp-dump-to-src "#\\([A-Za-z0-9]\\)" "# \\1" nil "^\\([ ]*#\\)\\([^#]\\)" "\\1#\\2"] 5 (#$ . 5558) "P"]) #@70 Make the changes in an S - dump() file to improve human readability. (defalias 'ess-dump-to-src #[(&optional dont-query verbose) "\302 \210\303\304\305 $\207" [dont-query verbose ess-mode ess-replace-regexp-dump-to-src "^\"\\([a-z.][a-z.0-9]*\\)\" *<-\n" "\n\\1 <- "] 5 (#$ . 5926) "P"]) #@136 Is VERY useful for dump(.)'ed numeric variables; ROUND some of them by replacing endings of 000000*.. and 999999*. Martin Maechler (defalias 'ess-num-var-round #[(&optional dont-query verbose) "\212eb\210\306\307\310\307\f\203\311 \312\211 %\210\202!\313 \312#\210 \314W\205T\315 !\316P \247\203? \317V\203?\320\321\322\n\"!\210eb\210\311\n\315 T!\323\324 %\210 T\211\202\"-\207" [to rgxp str num dont-query verbose 0 "" "000000+[1-9]?[1-9]?\\>" ess-rep-regexp nil query-replace-regexp 9 int-to-string "999999+[0-8]*" 1 message format "\nregexp: '%s'" fixedcase literal] 7 (#$ . 6222) "P"]) #@75 Remove trailing decimal '.' ("dot"), before BEFORE; typically from S-plus (defalias 'ess-fix-dot #[(before-chars &optional dont-query verbose) "\303\304\305Q\306 \n$\207" [before-chars dont-query verbose ess-replace-regexp-dump-to-src "\\([0-9]\\)\\.\\( *[" "]\\)" "\\1\\2"] 5 (#$ . 6838)]) #@143 Remove trailing decimal '.' ("dot"), before ':' or ']', i.e., in cases where it's ugly and nonsense. DO-QUERY(prefix) asks before replacing. (defalias 'ess-fix-dot-1 #[(&optional do-query verbose) "\302\303? #\207" [do-query verbose ess-fix-dot "]:"] 4 (#$ . 7137) "P"]) #@93 Remove trailing decimal '.' ("dot", typically from S+) in more cases than `ess-fix-dot-1'. (defalias 'ess-fix-dot-more #[(&optional dont-query verbose) "\302\303\"\210\304\305 #\207" [verbose dont-query ess-fix-dot-1 nil ess-fix-dot ",)"] 4 (#$ . 7416) "P"]) #@209 Replace "=" by "<-" in places where it 'might make sense', e.g., for function assignments and lines not ending in ",". Be *careful* for list()s of functions and when argument not-all is nil (as by default) ! (defalias 'ess-fix-EQ-assign #[(&optional dont-query verbose not-all) "\303\304\305 $\210\n?\205\303\306\305\307 $\207" [dont-query verbose not-all ess-replace-regexp-dump-to-src "^\\( *[a-z.][_a-z.0-9]*\\) *= *\\(function *(\\)" "\\1 <- \\2" "^\\( *[a-z.][][, \"_a-z.0-9]*\\) *= *\\([a-z.0-9({]\\(.*[^,]\\)? *$\\)" nil] 5 (#$ . 7685) "P"]) #@193 Clean up ess-source code which has been produced by dump(..), and other code typically produced by other tools. Produces more readable code, and one that is well formatted in emacs ess-mode. (defalias 'ess-MM-fix-src #[(&optional dont-query verbose) "\302!\210\303!\210\304 \"\210\305 \"\210\306 \307#\207" [dont-query verbose ess-dump-to-src ess-fix-comments ess-num-var-round ess-fix-dot-more ess-fix-EQ-assign not-all] 4 (#$ . 8244) "P"]) #@118 Fix Miscellaneous S/R `ill-formation's from current \[point]. Particularly use "<-"and put spaces around operators. (defalias 'ess-fix-miscellaneous #[(&optional from verbose) "\303\304\305 #!\210\212\n\306\230\203\307\310!\203\310 ?\"\210\303\311!\210b\210\312\313\314\315\211 %\210\303\316!\210\303\317!\210b\210\312\320\321\315\211 %\210b\210\312\322\323\315\211 %\210b\210\312\324\321\315\211 %\210b\210\312\325\321\315\211 %\210b\210\312\326\321\315\211\327%\210\303\330!\210b\210\312\331\332\315\211 %\210b\210\312\333\334\315\211 %\210b\210\312\335\336\337\315 %\210\312\340\341\337\315 %\210b\210\312\342\343\337\315 %\210\344\345 #\210\303\346!\210b\210\312\347\350\337\315 %\210b\210\312\351\352\337\315 %\210\303\353!)\207" [from verbose ess-dialect ess-if-verbose-write format "ess-fix-misc begin (from = %s, verbose = %s)\n" "R" fboundp ess-r-fix-T-F "ess-fix-misc: after fix-T-F\n" ess-rep-regexp ";\\( *\\)#" "\\1#" nil "ess-fix-misc: after ';' before #\n" "ess-fix-misc: before 'around \"<-\"' :\n" "\\([^< \n]\\)\\(<]\\)" "\\(>=?\\)\\([^= \n]\\)" "\\(<=?\\)\\([^-<= \n]\\)" t "ess-fix-misc: before \"=\" \"==\" .. :\n" "\\([^=!<> ]\\)\\([=!]?\\)=" "\\1 \\2=" "=\\([^= ]\\)" "= \\1" "{\\([.A-Za-z()]\\)" "{ \\1" fix "\\([()]\\){" "\\1 {" "\\([A-Za-z0-9()]\\)}" "\\1 }" ess-space-around "else" "ess-fix-misc: after \"{ ... }\" :\n" "){" ") {" "^\\([^#{\n]*[^#{ \n]+[ ]*\\)}[ ]*$" "\\1\n}" "ess-fix-misc __end__\n"] 6 (#$ . 8699) "d\nP"]) #@290 Cycle between assignment symbols in `ess-assign-list'. On consecutive calls, replace the assignment symbol before point with the next symbol from that list. This function sets the last keypress to repeat it, so if it is bound to "C-c C-=" pressing "=" again cycles to the next assignment. (defalias 'ess-cycle-assign #[nil " =\2033\n\306\f@\206\n@\fA\206\n\211\203/\307 ` GZ\310#\203\n\311\f@!\204\n*\2027\n@c\210\312\313 \314\315\316 !\"\317\320!\321#\210*!\207" [last-command this-command ess-assign-list str slist last-input-event nil re-search-backward t replace-match set-transient-map make-sparse-keymap format "%c" event-basic-type define-key kbd ess-cycle-assign key map] 6 (#$ . 10252) nil]) #@296 Insert the first element of `ess-assign-list' unless in string or comment. If the character before point is the first element of `ess-assign-list', replace it with the last character typed. If `ess-smart-S-assign-key' is nil, do `self-insert-command' using ARG as the number of times to insert. (defalias 'ess-insert-assign #[(arg) "\306\230\203P @\307 !\3101\311\312\f\"0\202\210\313\211\203*\314 \203* c\202N\315\n`\nGZ\316#\203L \203F\f\247\203F\317 \316\211#\202N\317\320!\202N\nc+\207\321!\207" [ess-language ess-assign-list assign last-input-event event char "S" event-basic-type (error) format "%c" nil ess-inside-string-or-comment-p re-search-backward t replace-match "" self-insert-command arg] 5 (#$ . 10984) "p"]) #@66 Insert `ess-smart-S-assign-key'. Please use `ess-insert-assign'. (defalias 'ess-smart-S-assign #[(arg) "\203\302 !\207\303 !\207" [ess-smart-S-assign-key arg ess-insert-assign self-insert-command] 2 (#$ . 11734) "p"]) (make-obsolete 'ess-smart-S-assign 'ess-insert-assign "ESS 18.10") #@30 Disable `ess-insert-assign'. (defalias 'ess-disable-smart-S-assign #[(&rest _ignore) "\301\211\207" [ess-smart-S-assign-key nil] 2 (#$ . 12028)]) (make-obsolete 'ess-disable-smart-S-assign "Use ess-smart-S-assign-key instead." "ESS 18.10") #@141 Define MM's user keys, currently \\[ess-insert-function-outline], and \\[ess-execute-screen-options]. (defalias 'ess-add-MM-keys #[nil "\302\303!\210\302\304!\210\305\306\307#\210\305 \310\311#\210\305\312\311#\207" [inferior-ess-mode-map ess-mode-map require ess-mode ess-inf define-key "w" ess-execute-screen-options [134217773] ess-insert-assign [134217773]] 4 (#$ . 12276) nil]) #@265 Dump the function name, with arguments, to a buffer for editing. Currently, this needs to: 1. set the buffer to the right mode, with the right settings 2. format the statement, 3. c/function/Sfunc/ and I need to relearn emacs lisp (but I had to, anyway. (defalias 'ess-dump-args-and-go #[(Sfunc) "\306\307\310\311 \"\312#\313\n!\210\314\315!\210\316\317\320\312#\203$\321 \320\312#\210\202\322 !\210\323\324 !\210\325!*\207" [buffname Sfunc buf ess-customize-alist major-mode ess-mode-map "ess-complete.R" ess-execute format "args(%s)" t pop-to-buffer message "here yet?" search-forward "function" nil replace-match ess-setq-vars-local ess-mode use-local-map set-syntax-table ess-mode-syntax-table] 4 (#$ . 12707) "sFunction ? "]) (defalias 'ess-chm-display-help-on-object #[(object &rest args) "\301\302\303Q!\207" [object ess-eval-linewise "help(" ")"] 4]) (defvar ess-imenu-S-generic-expression '(("Functions" "^\\(.+\\)[ \n]*<-[ \n]*function[ ]*(" 1) ("Classes" "^.*setClass(\\(.*\\)," 1) ("Coercions" "^.*setAs(\\([^,]+,[^,]*\\)," 1) ("Generics" "^.*setGeneric(\\([^,]*\\)," 1) ("Methods" "^.*set\\(Group\\|Replace\\)?Method(\\([^,]+,[^,]*\\)" 2) ("Package" "^.*\\(library\\|require\\)(\\(.*\\)" 2) ("Data" "^\\(.+\\)[ \n]-*<-[ \n]*\\(read\\|.*data.frame\\).*(" 1))) #@35 S Language Imenu support for ESS. (defalias 'ess-imenu-S #[(&optional arg) "\302\303!\207" [ess-imenu-generic-expression imenu-generic-expression imenu-add-to-menubar "Imenu-S"] 2 (#$ . 14009) nil]) (defalias 'ess-imenu-R 'ess-imenu-S) #@57 Extend to all extensions; see initialization, and edit. (defalias 'ess-S-initialize-speedbar #[nil "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [speedbar-add-supported-extension ".R" ".S" ".s" ".q"] 2 (#$ . 14253)]) #@241 Return a list of current S help topics associated with process NAME. If 'sp-for-help-changed?' process variable is non-nil or `ess-help-topics-list' is nil, (re)-populate the latter and return it. Otherwise, return `ess-help-topics-list'. (defalias 'ess-s-get-help-topics-function #[(name) "\205\304!\211\203Gr\305 !q\210\306\307\310\n\"!\210\311\312!\203\"\312 \210 \203,\313\314!\203B\315\314\316\"\210\317\320\321\n\322\"\323 \324 #!\211\202C )\202J\325\326!)\207" [ess-local-process-name *proc* name ess-help-topics-list get-process process-buffer ess-write-to-dribble-buffer format "(ess-get-help-topics-list %s) .." fboundp ess-help-r--check-last-help-type ess-process-get sp-for-help-changed\? ess-process-put nil ess-uniq-list append ess-get-object-list exclude-1st ess-get-help-files-list ess-get-help-aliases-list error "No current ESS process"] 6 (#$ . 14486)]) (byte-code "\203,\302\303\304\"\210\305\303M\210\306\307 !\310\232\203\311\202\312M\210\313\314M\210\315\316M\210\317\320M\210\2028\305\321M\210\315\316M\210\317\320M\210\322\317M\210\323\315M\210\302\324\325\326#\210\327\324\325\330#\210\302\331\332\326#\210\327\331\332\330#\210\302\333\332\326#\210\327\333\332\330#\210\302\334\335\326#\210\327\334\335\330#\210\302\336\335\326#\210\327\336\335\330#\210\337\340\341\"\210\337\340\342\"\210\343\344!\207" [ess-microsoft-p shell-file-name defalias S-by-icon #[(&rest x) "\300\301!\207" [message "Please start S+ from the icon.\n Then you can connect emacs to it with `M-x S-existing'."] 2 nil nil] S S-existing file-name-nondirectory "cmdproxy.exe" S+-msdos-existing S+-existing Sqpe Sqpe+ s-mode S+-mode s-transcript-mode S+-transcript-mode S+ S-transcript-mode S-mode ess-toggle-S-assign-key ignore nil make-obsolete "ESS 18.10" ess-smart-underscore ess-insert-assign ess-insert-S-assign ess-toggle-underscore ess-disable-smart-S-assign ess-toggle-S-assign add-to-list auto-mode-alist ("\\.[Ss]t\\'" . S-transcript-mode) ("\\.Sout" . S-transcript-mode) provide ess-s-lang] 4)