Bug #3320 ยป ruby-mode.el.patch
misc/ruby-mode.el (working copy) | ||
---|---|---|
(t
|
||
(setq in-string (point))
|
||
(goto-char end))))
|
||
((looking-at "/=")
|
||
((looking-at "/=")
|
||
(goto-char pnt))
|
||
((looking-at "/")
|
||
(cond
|
||
... | ... | |
(setq indent (ruby-indent-size (current-column) (nth 2 state))))
|
||
(t
|
||
(setq indent (+ (current-column) ruby-indent-level)))))
|
||
|
||
((and (nth 2 state) (< (nth 2 state) 0)) ; in negative nest
|
||
(setq indent (ruby-indent-size (current-column) (nth 2 state)))))
|
||
(when indent
|
||
... | ... | |
(concat "^[ \t]*\\(def\\|class\\|module\\)[ \t]+"
|
||
"\\("
|
||
;; \\. and :: for class method
|
||
"\\([A-Za-z_]" ruby-symbol-re "*\\|\\.\\|::" "\\)"
|
||
"\\([A-Za-z_]" ruby-symbol-re "*\\|\\.\\|::" "\\)"
|
||
"+\\)")
|
||
nil t)
|
||
(progn
|
||
... | ... | |
("\\(#\\)[{$@]" 1 (1 . nil))
|
||
;; the last $', $", $` in the respective string is not variable
|
||
;; the last ?', ?", ?` in the respective string is not ascii code
|
||
("\\(^\\|[\[ \t\n<+\(,=]\\)\\(['\"`]\\)\\(\\\\.\\|\\2\\|[^'\"`\n\\\\]\\)*?\\\\?[?$]\\(\\2\\)"
|
||
("\\(^\\|[\[ \t\n<+\(,=:]\\)\\(['\"`]\\)\\(\\\\.\\|\\2\\|[^'\"`\n\\\\]\\)*?\\\\?[?$]\\(\\2\\)"
|
||
(2 (7 . nil))
|
||
(4 (7 . nil)))
|
||
;; $' $" $` .... are variables
|