| Server IP : 217.160.0.212 / Your IP : 216.73.216.141 Web Server : Apache System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/progmodes/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(byte-code "\300\301!\210\302\303\304\305\306\307\310\311&\207" [require cl-lib custom-declare-group ruby nil "Major mode for editing Ruby code." :prefix "ruby-" :group languages] 8)
#@38 Keywords at the beginning of blocks.
(defconst ruby-block-beg-keywords '("class" "module" "def" "if" "unless" "case" "while" "until" "for" "begin" "do") (#$ . 268))
#@42 Regexp to match the beginning of blocks.
(defconst ruby-block-beg-re (regexp-opt ruby-block-beg-keywords) (#$ . 439))
#@52 Regexp to match keywords that nest without blocks.
(defconst ruby-non-block-do-re "\\_<\\(for\\|rescue\\|until\\|while\\)\\_>" (#$ . 563))
#@52 Regexp to match where the indentation gets deeper.
(defconst ruby-indent-beg-re "^\\(\\s *\\(?:class\\|def\\|module\\)\\|\\(?:begin\\|case\\|for\\|if\\|un\\(?:less\\|til\\)\\|while\\)\\)\\_>" (#$ . 708))
#@57 Modifiers that are the same as the beginning of blocks.
(defconst ruby-modifier-beg-keywords '("if" "unless" "while" "until") (#$ . 918))
#@60 Regexp to match modifiers same as the beginning of blocks.
(defconst ruby-modifier-beg-re (regexp-opt ruby-modifier-beg-keywords) (#$ . 1062))
#@28 Regexp to match modifiers.
(defconst ruby-modifier-re (byte-code "\301\302B!\207" [ruby-modifier-beg-keywords regexp-opt "rescue"] 3) (#$ . 1211))
#@78 Keywords where the indentation gets shallower in middle of block statements.
(defconst ruby-block-mid-keywords '("then" "else" "elsif" "when" "rescue" "ensure") (#$ . 1365))
#@80 Regexp for where the indentation gets shallower in middle of block statements.
(defconst ruby-block-mid-re (regexp-opt ruby-block-mid-keywords) (#$ . 1545))
#@35 Regexp to match boolean keywords.
(defconst ruby-block-op-keywords '("and" "or" "not") (#$ . 1708))
#@42 Regexp to match hanging block modifiers.
(defconst ruby-block-hanging-re (byte-code "\302\303 \"!\207" [ruby-modifier-beg-keywords ruby-block-op-keywords regexp-opt append] 4) (#$ . 1814))
(defconst ruby-block-end-re "\\_<end\\_>")
#@65 Regexp to match the beginning of a defun, in the general sense.
(defconst ruby-defun-beg-re "\\(def\\|class\\|module\\)" (#$ . 2053))
#@61 Regexp to match the beginning of a singleton class context.
(defconst ruby-singleton-class-re "class\\s *<<" (#$ . 2193))
#@45 Regexp to match the beginning of a heredoc.
(defconst ruby-here-doc-beg-re "\\(<\\)<\\([~-]\\)?\\(\\([a-zA-Z0-9_]+\\)\\|[\"]\\([^\"]+\\)[\"]\\|[']\\([^']+\\)[']\\)" (#$ . 2321))
(defconst ruby-expression-expansion-re "#\\({[^}\n\\]*\\(\\\\.[^}\n\\]*\\)*}\\|\\(?:\\$\\|@\\|@@\\)\\(\\w\\|_\\)+\\|\\$[^a-zA-Z \n]\\)")
#@122 Return a regexp to find the end of a heredoc.
This should only be called after matching against `ruby-here-doc-beg-re'.
(defalias 'ruby-here-doc-end-match #[0 "\300\301\302!\205 \303\304\301\305!\206 \301\306!\206 \301\307!!Q\207" ["^" match-string 2 "[ ]*" regexp-quote 4 5 6] 5 (#$ . 2643)])
(defconst ruby-delimiter (concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\_<\\(" ruby-block-beg-re "\\)\\_>\\|" ruby-block-end-re "\\|^=begin\\|" ruby-here-doc-beg-re))
#@55 Regexp to match where the indentation gets shallower.
(defconst ruby-negative (concat "^[ ]*\\(\\(" ruby-block-mid-re "\\)\\>\\|" ruby-block-end-re "\\|}\\|\\]\\)") (#$ . 3116))
#@28 Regexp to match operators.
(defconst ruby-operator-re "[-,.+*/%&|^~=<>:]\\|\\\\$" (#$ . 3301))
#@51 List of characters that symbol names may contain.
(defconst ruby-symbol-chars "a-zA-Z0-9_" (#$ . 3402))
#@26 Regexp to match symbols.
(defconst ruby-symbol-re (concat "[" ruby-symbol-chars "]") (#$ . 3512))
(defvar ruby-use-smie t)
(make-obsolete-variable 'ruby-use-smie nil "28.1")
#@27 Keymap used in Ruby mode.
(defvar ruby-mode-map (byte-code "\301 \204\f \302\303\304#\210\203 \302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210\207" [ruby-use-smie make-sparse-keymap define-key [134217745] ruby-indent-exp [134217732] smie-down-list [134217744] ruby-beginning-of-block [134217742] ruby-end-of-block "{" ruby-toggle-block "'" ruby-toggle-string-quotes "" ruby-find-library-file] 5) (#$ . 3692))
#@17 Ruby Mode Menu.
(defvar ruby-mode-menu nil (#$ . 4175))
(easy-menu-do-define 'ruby-mode-menu ruby-mode-map "Ruby Mode Menu." '("Ruby" ["Beginning of Block" ruby-beginning-of-block t] ["End of Block" ruby-end-of-block t] ["Toggle Block" ruby-toggle-block t] "--" ["Toggle String Quotes" ruby-toggle-string-quotes t] "--" ["Backward Sexp" backward-sexp t] ["Forward Sexp" forward-sexp t] ["Indent Sexp" ruby-indent-exp :visible (not ruby-use-smie)] ["Indent Sexp" prog-indent-sexp :visible ruby-use-smie]))
#@35 Syntax table to use in Ruby mode.
(defvar ruby-mode-syntax-table (byte-code "\300 \301\302\303#\210\301\304\303#\210\301\305\303#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\317#\210\301\320\315#\210\301\321\315#\210\301\322\323#\210\301\324\323#\210\301\325\323#\210\301\326\323#\210\301\327\323#\210\301\330\323#\210\301\331\323#\210\301\332\323#\210\301\333\323#\210\301\334\323#\210\301\335\323#\210\301\336\337#\210\301\340\341#\210\301\342\343#\210\301\344\345#\210\301\346\347#\210\301\350\351#\210\207" [make-syntax-table modify-syntax-entry 39 "\"" 34 96 35 "<" 10 ">" 92 "\\" 36 "'" 95 "_" 58 64 60 "." 62 38 124 37 61 47 43 42 45 59 40 "()" 41 ")(" 123 "(}" 125 "){" 91 "(]" 93 ")["] 5) (#$ . 4686))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\315\310\316&\210\300\317\302\303\320DD\321\306\315\310\316&\207" [custom-declare-variable ruby-indent-tabs-mode funcall function #[0 "\300\207" [nil] 1 #1=""] "Indentation can insert tabs in Ruby mode if this is non-nil." :type boolean :safe booleanp ruby-indent-level #[0 "\300\207" [2] 1 #1#] "Indentation of Ruby statements." integer integerp ruby-comment-column #[0 "\300\301!\207" [default-value comment-column] 2 #1#] "Indentation column of comments."] 8)
#@61 Keywords that can be used in `ruby-align-to-stmt-keywords'.
(defconst ruby-alignable-keywords '(if while unless until begin case for def) (#$ . 6021))
(byte-code "\301\302\303\304\305DD\306\307\310\311\312\313\314\315\310\316\317\"BFF\320\321\322\323& \210\301\324\303\304\325DD\326\307\327\320\330\322\323& \210\301\331\303\304\332DD\333\307\327\320\330&\210\301\334\303\304\335DD\336\307\337%\210\301\340\303\304\341DD\342\307\343%\210\301\344\303\304\345DD\346\307\347%\210\301\350\303\304\351DD\352\307\327\353\354&\210\301\355\303\304\356DD\357\307\360\322\323&\210\301\361\303\304\362DD\363\307\364\322\323&\210\301\365\303\304\366DD\367\307\327\353\354&\210\370\371!\207" [ruby-alignable-keywords custom-declare-variable ruby-align-to-stmt-keywords funcall function #[0 "\300\207" [(def)] 1 #1=""] "Keywords after which we align the expression body to statement.\n\nWhen nil, an expression that begins with one these keywords is\nindented to the column of the keyword. Example:\n\n tee = if foo\n bar\n else\n qux\n end\n\nIf this value is t or contains a symbol with the name of given\nkeyword, the expression is indented to align to the beginning of\nthe statement:\n\n tee = if foo\n bar\n else\n qux\n end\n\nOnly has effect when `ruby-use-smie' is t." :type choice (const :tag "None" nil) (const :tag "All" t) repeat :tag "User defined" mapcar #[257 "\300D\207" [const] 3 "\n\n(fn KW)"] :safe listp :version "24.4" ruby-align-chained-calls #[0 "\300\207" [nil] 1 #1#] "If non-nil, align chained method calls.\n\nEach method call on a separate line will be aligned to the column\nof its parent.\n\nOnly has effect when `ruby-use-smie' is t." boolean booleanp ruby-deep-arglist #[0 "\300\207" [t] 1 #1#] "Deep indent lists in parenthesis when non-nil.\nAlso ignores spaces after parenthesis when `space'.\nOnly has effect when `ruby-use-smie' is nil." ruby-deep-indent-paren #[0 "\300\207" [(40 91 93 t)] 1 #1#] "Deep indent lists in parenthesis when non-nil.\nThe value t means continuous line.\nAlso ignores spaces after parenthesis when `space'.\nOnly has effect when `ruby-use-smie' is nil." (choice (const nil) character (repeat (choice character (cons character (choice (const nil) (const t))) (const t)))) ruby-deep-indent-paren-style #[0 "\300\207" [space] 1 #1#] "Default deep indent style.\nOnly has effect when `ruby-use-smie' is nil." (choice (const t) (const nil) (const space)) ruby-encoding-map #[0 "\300\207" [((us-ascii) (utf-8) (shift-jis . cp932) (shift_jis . cp932) (japanese-cp932 . cp932))] 1 #1#] "Alist to map encoding name from Emacs to Ruby.\nAssociating an encoding name with nil means it needs not be\nexplicitly declared in magic comment." (repeat (cons (symbol :tag "From") (symbol :tag "To"))) ruby-insert-encoding-magic-comment #[0 "\300\207" [t] 1 #1#] "Insert a magic Ruby encoding comment upon save if this is non-nil.\nThe encoding will be auto-detected. The format of the encoding comment\nis customizable via `ruby-encoding-magic-comment-style'.\n\nWhen set to `always-utf8' an utf-8 comment will always be added,\neven if it's not required." :group ruby ruby-encoding-magic-comment-style #[0 "\300\207" [ruby] 1 #1#] "The style of the magic encoding comment to use." (choice (const :tag "Emacs Style" emacs) (const :tag "Ruby Style" ruby) (const :tag "Custom Style" custom)) ruby-custom-encoding-magic-comment-template #[0 "\300\207" ["# encoding: %s"] 1 #1#] "A custom encoding comment template.\nIt is used when `ruby-encoding-magic-comment-style' is set to `custom'." string ruby-use-encoding-map #[0 "\300\207" [t] 1 #1#] "Use `ruby-encoding-map' to set encoding magic comment if this is non-nil." require smie] 15)
(defconst ruby-smie-grammar '((:smie-closer-alist (#14="def" . "end") (#13="begin" . "end") (#12="do" . "end") (#11="class" . "end") (#10="module" . "end") (#9="for" . "end") (#8="[" . #16="]") ("{" . "}") (#7="while" . "end") (#6="until" . "end") (#5="unless" . "end") (#4="if" . "end") (#3="case" . #15="end") (#2="opening-|" . #1="closing-|")) ("**" 372 383) ("%" 346 359) ("/" 347 360) ("*" 348 361) ("-" 322 334) ("+" 323 335) (">>" 298 310) ("<<" 299 311) ("|" 272 285) ("&" 273 286) ("^" 274 287) ("<=" 242 258) ("<" 243 259) (">=" 244 260) (">" 245 261) ("!~" 246 227) ("=~" 247 228) ("!=" 213 229) ("===" 214 230) ("==" 215 231) ("<=>" 216 200) ("||" 188 201) ("&&" 189 202) ("..." 150 176) (".." 151 177) ("||=" 152 126) ("&&=" 153 127) (">>=" 154 128) ("<<=" 155 129) ("^=" 156 130) ("|=" 157 131) ("&=" 158 132) ("**=" 159 133) ("%=" 160 134) ("/=" 161 135) ("*=" 162 136) ("-=" 163 137) ("+=" 164 138) (#1# 0 (405)) (#2# (406) 0) ("when" 17 17) ("elsif" 15 15) ("else" 28 29) ("then" 30 41) ("=>" 104 103) ("in" 407 63) ("rescue" 16 16) ("ensure" 16 16) (#3# (408) 1) (#4# (409) 1) (#5# (410) 1) (#6# (411) 1) (#7# (412) 1) ("{" (413) 2) (#8# (414) 3) (#9# (415) 1) (#10# (416) 1) (#11# (417) 1) (#12# (418) 1) (#13# (419) 1) (#14# (420) 1) ("?" 165 4) ("," 91 91) ("=" 115 102) (" @ " 421 77) ("." 394 394) (#15# 1 (422)) ("}" 2 (423)) (#16# 3 (424)) (":" 4 139) ("or" 64 78) ("and" 65 79) (";" 52 52) ("iuwu-mod" 66 80)))
(defalias 'ruby-smie--bosp #[0 "\212\300\301x\210n\203 `S\206 `Sf\302=?\206- `Sf\303=\206- `Sf\304=\205- \305`S!\306\232)\207" [" " nil 92 59 61 syntax-after (1)] 2])
(defalias 'ruby-smie--implicit-semi-p #[0 "\212\300\301x\210n\206Q `Sf\302>\206Q `Sf\303>\203$ \304`S!@\305>?\206Q `Sf\306=\2035 \212\307 )\310\235\206Q \304`S!@\311=\203H \212\307 )\312\235\206Q \212\313d!\210\314\315!))?\207" [" " nil (91 40) (59 45 43 42 47 58 46 44 92 38 62 60 37 126 94 61 63) syntax-after (3 7 15) 124 ruby-smie--backward-token ("|" "||") 2 ("iuwu-mod" "and" "or") forward-comment looking-at "&?\\."] 2])
#@23
(fn &optional SKIP)
(defalias 'ruby-smie--redundant-do-p #[256 "\212\211\203 \300\301!\210\302\303\304!8\305\235)\207" [backward-word-strictly 1 2 smie-backward-sexp ";" ("while" "until" "for")] 4 (#$ . 11783)])
(defalias 'ruby-smie--opening-pipe-p #[0 "\212`Sf\300=\203\f \301u\210\302\303x\210`Sf\304=\206 \305\306`\307Z\")\207" [124 -1 " \n" nil 123 looking-back "\\_<do" 2] 4])
(defalias 'ruby-smie--closing-pipe-p #[0 "\212`Sf\300=\203\f \301u\210\302\303\304 \305#\205 \306 )\207" [124 -1 re-search-backward "|" line-beginning-position t ruby-smie--opening-pipe-p] 4])
#@12
(fn POS)
(defalias 'ruby-smie--args-separator-p #[257 "\211\300 W\205B hz\301=\204\"