;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require ess-custom ess-utils ess-help ess-inf] 2) #@31 Current version of ess-rd.el. (defvar essddr-version "0.9-1" (#$ . 204)) #@34 Current maintainer of ess-rd.el. (defvar essddr-maintainer-address "ESS Core Team " (#$ . 283)) #@95 Abbrev table for R documentation keywords. All Rd mode abbrevs start with a grave accent (`). (defvar Rd-mode-abbrev-table nil (#$ . 409)) (byte-code "\204\275\301\300\302\"\210\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\303\314\315#\210\303\316\317#\210\303\320\321#\210\303\322\323#\210\303\324\325#\210\303\326\327#\210\303\330\331#\210\303\332\333#\210\303\334\335#\210\303\336\337#\210\303\340\341#\210\303\342\343#\210\303\344\345#\210\303\346\347#\210\303\350\351#\210\303\352\353#\210\303\354\355#\210\303\356\357#\210\303\360\361#\210\303\362\363#\210\303\364\365#\210\303\366\367#\210\303\370\371#\210\303\372\373#\210\303\374\375#\210\303\376\377#\210\302\207" [Rd-mode-abbrev-table define-abbrev-table nil define-abbrev "`ag" "\\arguments" "`al" "\\alias" "`au" "\\author" "`bf" "\\bold" "`co" "\\code" "`de" "\\describe" "`dn" "\\description" "`dt" "\\details" "`em" "\\emph" "`en" "\\enumerate" "`ex" "\\examples" "`fi" "\\file" "`fo" "\\format" "`it" "\\item" "`iz" "\\itemize" "`kw" "\\keyword" "`li" "\\link" "`me" "\\method" "`na" "\\name" "`no" "\\note" "`re" "\\references" "`sa" "\\seealso" "`se" "\\section" "`so" "\\source" "`ss" "\\subsection" "`sy" "\\synopsis" "`ta" "\\tabular" "`ti" "\\title" "`us" "\\usage" "`va" "\\value"] 4) #@27 Syntax table for Rd mode. (defvar Rd-mode-syntax-table nil (#$ . 1729)) (byte-code "\204J\302 !\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\303\314\315#\210\303\316\317#\210\303\320\321#\210\303\322\323#\210\303\324\325#\210\303\326\327#\210\303\330\331#\210\302\207" [Rd-mode-syntax-table text-mode-syntax-table copy-syntax-table modify-syntax-entry 92 "\\" 123 "(}" 125 "){" 40 "()" 41 ")(" 91 "(]" 93 ")[" 34 "\"" 96 "w" 37 "<" 10 ">"] 4) #@35 Syntax table for parsing Rd mode. (defvar Rd-mode-parse-syntax-table nil (#$ . 2215)) (byte-code "\204 \302 !\303\304\305#\210\303\306\305#\210\303\307\305#\210\303\310\305#\210\302\207" [Rd-mode-parse-syntax-table Rd-mode-syntax-table copy-syntax-table modify-syntax-entry 40 "_" 41 91 93] 4) (defvar Rd-section-names '("Rdversion" "arguments" "alias" "author" "concept" "describe" "description" "details" "docType" "encoding" "enumerate" "examples" "format" "itemize" "keyword" "name" "note" "preformatted" "references" "seealso" "section" "source" "subsection" "synopsis" "tabular" "title" "usage" "value")) (defvar Rd-keywords '("R" "RdOpts" "S3method" "S4method" "Sexpr" "acronym" "bold" "cite" "code" "command" "cr" "dQuote" "deqn" "dfn" "dontrun" "dontshow" "donttest" "dots" "email" "emph" "enc" "env" "eqn" "figure" "file" "href" "if" "ifelse" "item" "kbd" "ldots" "linkS4class" "link" "method" "newcommand" "option" "out" "pkg" "sQuote" "renewcommand" "samp" "strong" "tab" "url" "var" "verb" "CRANpkg" "PR" "sspace" "doi" "packageTitle" "packageDescription" "packageAuthor" "packageMaintainer" "packageDESCRIPTION" "packageIndices")) #@41 Additional Rd expressions to highlight. (defvar Rd-font-lock-keywords (byte-code "\302\303\304\305#\306Q\307B\302\303\304 \305#\306Q\310B\311\312F\207" [Rd-section-names Rd-keywords "\\\\\\(" mapconcat identity "\\|" "\\>\\)" font-lock-reference-face font-lock-keyword-face ("^#\\(ifn?def\\)\\s-+\\(\\sw+\\)" (1 font-lock-builtin-face) (2 font-lock-variable-name-face nil t)) ("^#\\(endif\\)" 1 font-lock-builtin-face)] 6) (#$ . 3373)) #@60 *Indentation of Rd code with respect to containing blocks. (defvar Rd-indent-level 2 (#$ . -3816)) #@25 Keymap used in Rd mode. (defvar Rd-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\306#\210\302\310\311#\210\302\312\313#\210\302\314\315#\210\302\316\317#\210\302\320\321#\210\302\322\323#\210\302\324\325#\210\302\326\327#\210\302\330\331#\210\302\332\333#\210\302\334\335#\210\302\336\337#\210\302\340\341#\210)\207" [map make-sparse-keymap define-key " " indent-according-to-mode "\n" reindent-then-newline-and-indent " " "" Rd-preview-help "\n" Rd-mode-insert-item "" Rd-mode-insert-skeleton "" Rd-font "" Rd-mode-insert-section "" ess-eval-line-visibly-and-step "" ess-eval-region "" ess-eval-region-or-function-or-paragraph-and-step "\230" ess-eval-region-or-function-or-paragraph "" ess-display-help-on-object "" ess-switch-process "" ess-switch-to-ESS "" ess-switch-to-end-of-ESS] 4) (#$ . 3921)) #@23 Menu used in Rd mode. (defvar Rd-mode-menu (list "Rd" ["Markup [word]" Rd-font t] ["Insert Item" Rd-mode-insert-item t] ["Insert Section" Rd-mode-insert-section t] ["Insert Skeleton" Rd-mode-insert-skeleton t] #1="-" ["Preview" Rd-preview-help t] #1# ["Eval Line" ess-eval-line-visibly-and-step t] ["Eval Region" ess-eval-region t] ["Switch to ESS Process" ess-switch-to-ESS t] ["Switch the ESS Process" ess-switch-process t] ["Switch to end{ESS Pr}" ess-switch-to-end-of-ESS t] #1# ["Toggle Abbrev Mode" abbrev-mode t] ["Toggle Auto-Fill Mode" auto-fill-mode t] #1# ["Submit Bug Report" Rd-submit-bug-report t] #1# ["Describe Rd Mode" Rd-describe-major-mode t]) (#$ . 4794)) #@41 Hook to be run when Rd mode is entered. (defvar Rd-mode-hook nil (#$ . 5476)) #@67 Shell command for converting R documentation source to help text. (defvar Rd-to-help-command "R CMD Rd2txt" (#$ . 5560)) #@225 List of "fonts" used by `Rd-font'. Each entry is a list. The first element is the key to activate the font. The second element is the string to insert before point, and the third element is the string to insert after point. (defvar Rd-font-list '((2 "\\bold{" "}") (3 "\\code{" "}") (5 "\\emph{" "}") (12 "\\link{" "}") (108 "\\code{\\link{" "}}") (13 "\\email{" "}") (17 "\\eqn{" "}") (21 "\\url{" "}")) (#$ . 5688)) #@823 Major mode for editing R documentation source files. This mode makes it easier to write R documentation by helping with indentation, doing some of the typing for you (with Abbrev mode) and by showing keywords, strings, etc. in different faces (with Font Lock mode on terminals that support it). Type \[list-abbrevs] to display the built-in abbrevs for Rd keywords. Keybindings =========== \{Rd-mode-map} Variables you can use to customize Rd mode ========================================== `Rd-indent-level' Indentation of Rd code with respect to containing blocks. Default is 2. Turning on Rd mode runs the hook `Rd-mode-hook'. To automatically turn on the abbrev(iate) features, add the following lines to your `.emacs' file: (add-hook 'Rd-mode-hook (lambda () (abbrev-mode 1))) (defalias 'Rd-mode #[nil "\306 \210\307 \210\310!\210\311 !\210\312\313\f\314)!\210\315\316!\210\317\315\320!\210\321\315\322!\210\323\315\324!\210\325\315\326!\210\327\315\330!\210\331\315\332!\210\333\334\335!\210\336\333!\210\337\340 \341*$\210\342 \210\343\344+\"\210\345,\346-\347\350!\207" [ess-r-customize-alist Rd-mode-map mode-name major-mode Rd-mode-abbrev-table local-abbrev-table text-mode kill-all-local-variables ess-setq-vars-local use-local-map "Rd" Rd-mode set-syntax-table make-local-variable indent-line-function Rd-mode-indent-line fill-column 72 comment-start-skip "\\s<+\\s-*" comment-start "% " comment-end "" font-lock-defaults (Rd-font-lock-keywords nil nil) create-lockfiles nil require easymenu (lambda (def-tmp-var) (defvar Rd-mode-menu-map def-tmp-var #1="Menu keymap for Rd mode.")) easy-menu-do-define Rd-mode-menu-map #1# turn-on-auto-fill message "Rd mode version %s" "S" "R" run-mode-hooks Rd-mode-hook Rd-mode-syntax-table Rd-mode-menu essddr-version ess-language ess-dialect] 5 (#$ . 6113) nil]) (add-to-list 'auto-mode-alist '("\\.Rd\\'" . Rd-mode)) #@50 Return the value of point at a certain POSITION. (defalias 'ess-point #[(position) "\212\301\267\202%\302 \210\202*\303\210\202*\304 \210\202*\305y\210\202*\306y\210\202*\307\310\"\210`)\207" [position #s(hash-table size 5 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (bol 7 eol 13 boi 19 bonl 25 bopl 31)) beginning-of-line nil back-to-indentation 1 -1 error "Unknown buffer position requested: %s"] 3 (#$ . 8051)]) #@34 Describe the current major mode. (defalias 'Rd-describe-major-mode #[nil "\301!\207" [major-mode describe-function] 2 (#$ . 8502) nil]) (defalias 'Rd-mode-in-verbatim-p #[nil "`\212\301\302\303\304#\205$\305\306\303\304#\205$\3071\"\310\311!\210`W0\202$\210\304*\207" [pos re-search-backward "\\\\\\(usage\\|examples\\|synopsis\\)" nil t re-search-forward "\\s(" (error) up-list 1] 4]) (defalias 'Rd-mode-in-preprocessor-line-p #[nil "\212\300 \210\301\302!)\207" [beginning-of-line looking-at "[ ]*#\\(ifdef\\|endif\\)"] 2]) #@61 Return appropriate indentation for current line in Rd mode. (defalias 'Rd-mode-calculate-indent #[nil "\212\304 \210\305 \203 \306\202`\307 \203\310\202`\311\312\313\314!\315#\210`\316y\310W\204,\305 \2030\310\202_\317 !\210\320\321!\204?\307 \203Io\204I\316y\210\2024\311\312\313\314!\315#\210\322 \323`\"@\n_\\\317 !\210))\207" [p Rd-mode-parse-syntax-table Rd-indent-level Rd-mode-syntax-table beginning-of-line Rd-mode-in-verbatim-p nil Rd-mode-in-preprocessor-line-p 0 re-search-forward "[ ]*\\s)*" ess-point eol t -1 set-syntax-table looking-at "[ ]*$" current-indentation parse-partial-sexp] 4 (#$ . 9042) nil]) #@35 Indent current line as Rd source. (defalias 'Rd-mode-indent-line #[nil "\302 i\303 Z\211\205' \304W\203\305\306!\202'\307 !\210\304V\205'\310 \\!*\207" [rp ic Rd-mode-calculate-indent current-indentation 0 error "Unmatched parenthesis" indent-line-to move-to-column] 4 (#$ . 9683) nil]) (defalias 'Rd-mode-insert-item #[nil "\300 \210\301c\207" [reindent-then-newline-and-indent "\\item{"] 1 nil nil]) (defalias 'Rd-mode-insert-section #[nil "\302\303\304\305\"\306\307$\211\310\230\203\311c\210\312u\202\313\314 \"c)\207" [Rd-section-names s ess-completing-read "Insert section: " mapcar #[(x) "\211B\207" [x] 2] nil t "" "\\section{}{" -2 format "\\%s{"] 6 nil nil]) (defalias 'Rd-mode-insert-skeleton #[nil "\300c\210\301c\210\302c\210\303c\210\304c\210\305c\210\306c\210\307c\210\310c\210\311c\210\312c\210\313c\210\314c\207" ["\\name{}\n" "\\alias{}\n" "\\title{}\n" "\\description{\n}\n" "\\usage{\n}\n" "\\arguments{\n}\n" "\\value{\n}\n" "\\details{\n}\n" "\\references{\n}\n" "\\seealso{\n}\n" "\\examples{\n}\n" "\\author{}\n" "\\keyword{}\n"] 1 nil nil]) #@100 Insert template for font command. WHAT determines the font to use, as specified by `Rd-font-list'. (defalias 'Rd-font #[(what) "\306 \"\211A@\307\n8\n\204U\310\311\312 \313#Pr\314\315!q\210p\316 \210\317\211\320\211\320\321 \210\322\323!\210+\211\315q\210 c\324!\210,\202\202\325 \203{\212\326 `V\203n c\210\326 b\210\fc\202w\fc\210\326 b\210 c)\202\202 c\210\212\fc)+\207" [what Rd-font-list entry before after help assoc 2 "Rd Markup (available from C-c C-f):\n\n KEY Rd-Markup\n\n" mapconcat #[(entry) "\301\302\303\304@!!\"\301\305A@\3068#P\207" [entry format "%11s " key-description char-to-string "%14s %-3s" 2] 6] "\n" get-buffer-create "*Help*" kill-all-local-variables nil t erase-buffer run-hooks temp-buffer-setup-hook internal-temp-output-buffer-show region-active-p mark default-directory #1=#:old-dir buffer-read-only buffer-file-name buffer-undo-list inhibit-modification-hooks inhibit-read-only #2=#:buf standard-output] 6 (#$ . 10772) "c"]) #@214 Preview the current Rd buffer contents as help. If optional VIA-SHELL is set, using `Rd-to-help-command'. If the current buffer is not associated with a file, create a temporary one in `temporary-file-directory'. (defalias 'Rd-preview-help #[(&optional via-shell) "\306\307!\210\310\311!\312\211\204\313\314\312\315#\316ed #\210\317\f\203A\320\321 #\"\nq\210\322 \210\323\320\324\"\"!\210\325\"\317\"\210)\202P\326\327!\210\330\320\331 \"\n\"\210\nq\210\332#!\210$%&'\333 \210\334 \210eb\210\335\312!\210\317(\312) \203x\336 !\210\337\n\340\"?\205\204\341\n\317\"+\207" [buffer-file-name del-p pbuf file via-shell Rd-to-help-command require ess-help get-buffer-create "R Help Preview" nil make-temp-file "RD_" ".Rd" write-region t format "%s '%s'" erase-buffer ess-write-to-dribble-buffer "Rd-preview-help: (shell-command |%s| t)" shell-command ess-force-buffer-current "R process to use: " ess-command ".ess_Rd2txt(\"%s\")\n" ess-setq-vars-local ess-help-underline ess-help-mode set-buffer-modified-p delete-file get-buffer-window visible display-buffer shcmd ess-r-customize-alist ess-help-r-sec-regex ess-help-sec-regex ess-help-r-sec-keys-alist ess-help-sec-keys-alist buffer-read-only truncate-lines] 5 (#$ . 11785) "P"]) #@42 Submit a bug report on Rd mode via mail. (defalias 'Rd-submit-bug-report #[nil "\302\303!\210\304\305!\205\306\307 P\310\311D#\207" [essddr-maintainer-address emacs-version require reporter y-or-n-p "Do you want to submit a bug report? " reporter-submit-bug-report "Emacs version " essddr-version Rd-indent-level] 5 (#$ . 13041) nil]) (byte-code "\300\301!\210\300\302!\207" [provide essddr ess-rd] 2)