From 1727010a3abf84fd06f0e44d44b1b8ef6cde588e Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 25 Feb 1999 06:39:12 +0000 Subject: 990225 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- misc/ruby-mode.el | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'misc/ruby-mode.el') 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) -- cgit v1.2.3