diff options
Diffstat (limited to 'misc/ruby-mode.el')
-rw-r--r-- | misc/ruby-mode.el | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 50e4f50e87..75efbf012b 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -180,12 +180,8 @@ The variable ruby-indent-level controls the amount of indentation. (back-to-indentation) (setq top (current-column)) (skip-chars-backward " \t") - (cond - ((>= x shift) + (if (>= shift top) (setq shift (- shift top)) (setq shift 0)) - ((>= shift top) - (setq shift (- shift top))) - (t (setq shift 0))) (if (and (bolp) (= x top)) (move-to-column (+ x shift)) @@ -669,7 +665,6 @@ An end of a defun is found by moving forward from the beginning of one." "return" "then" "throw" - "self" "super" "unless" "undef" @@ -681,8 +676,8 @@ An end of a defun is found by moving forward from the beginning of one." "\\)\\>[^_]") 2) ;; variables - '("\\b\\(nil\\|self\\|true\\|false\\)\\b" - 1 font-lock-variable-name-face) + '("\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(nil\\|self\\|true\\|false\\)\\b[^_]" + 2 font-lock-variable-name-face) ;; variables '("[$@].\\(\\w\\|_\\)*" 0 font-lock-variable-name-face) |