summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/ruby-mode.el28
1 files changed, 11 insertions, 17 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index af59f709a6..e27102f212 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -217,7 +217,7 @@ The variable ruby-indent-level controls the amount of indentation.
(progn
(goto-char (match-end 0))
(looking-at "\\>"))
- (looking-at "[a-zA-Z][a-zA-z0-9_]* /[^ \t]"))))))))
+ (looking-at "[a-zA-Z][a-zA-z0-9_]* +/[^ \t]"))))))))
(defun ruby-parse-region (start end)
(let ((indent-point end)
@@ -250,7 +250,6 @@ The variable ruby-indent-level controls the amount of indentation.
(setq in-string (point))
(goto-char indent-point))))
((looking-at "/")
- (echo "here %s" (ruby-expr-beg))
(cond
((and (not (eobp)) (ruby-expr-beg))
(if (re-search-forward "[^\\]/" indent-point t)
@@ -686,20 +685,15 @@ An end of a defun is found by moving forward from the beginning of one."
'("^\\s *def\\s *\\<\\(\\(\\w\\|\\s_\\)+\\.\\)?\\(\\(\\w\\|\\s_\\)+\\)\\>"
3 font-lock-function-name-face t))
"*Additional expressions to highlight in ruby mode.")
- (if (and (>= (string-to-int emacs-version) 19)
- (not (featurep 'xemacs)))
- (add-hook
- 'ruby-mode-hook
- (lambda ()
- (make-local-variable 'font-lock-syntactic-keywords)
- (setq font-lock-syntactic-keywords
- '(("\\$\\([#\"'$\\]\\)" 1 (1 . nil))
- ("\\(#\\)[{$@]" 1 (1 . nil))))
- (make-local-variable 'font-lock-defaults)
- (setq font-lock-defaults
- '((ruby-font-lock-keywords) nil nil ((?\_ . "w") (?$ . "/"))))))
- (add-hook 'ruby-mode-hook
- (lambda ()
- (setq font-lock-keywords ruby-font-lock-keywords))))))
+ (add-hook
+ 'ruby-mode-hook
+ (lambda ()
+ (make-local-variable 'font-lock-syntactic-keywords)
+ (setq font-lock-syntactic-keywords
+ '(("\\$\\([#\"'$\\]\\)" 1 (1 . nil))
+ ("\\(#\\)[{$@]" 1 (1 . nil))))
+ (make-local-variable 'font-lock-defaults)
+ (setq font-lock-defaults '((ruby-font-lock-keywords) nil nil))
+ (setq font-lock-keywords ruby-font-lock-keywords)))))
(provide 'ruby-mode)