summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-25 06:39:12 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-25 06:39:12 +0000
commit1727010a3abf84fd06f0e44d44b1b8ef6cde588e (patch)
tree098dc615cb65069b1d3f714cd959d3d3927c2aeb /misc
parent3976feed73bf4ec27183824870ee077c2b5b00b1 (diff)
990225
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 af59f70..e27102f 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)