* misc/ruby-mode.el (ruby-calculate-indent): indentation after
comment at beginning of buffer failed. * misc/ruby-mode.el (font-lock-defaults): unless XEmacs, set font-lock variables in ruby-mode-hook. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1a101d775a
commit
dffbc4d7f1
@ -1,3 +1,11 @@
|
|||||||
|
Wed Jan 9 20:21:09 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
|
||||||
|
|
||||||
|
* misc/ruby-mode.el (ruby-calculate-indent): indentation after
|
||||||
|
comment at beginning of buffer failed.
|
||||||
|
|
||||||
|
* misc/ruby-mode.el (font-lock-defaults): unless XEmacs, set
|
||||||
|
font-lock variables in ruby-mode-hook.
|
||||||
|
|
||||||
Tue Jan 8 15:54:02 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
|
Tue Jan 8 15:54:02 2002 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
|
||||||
|
|
||||||
* eval.c (rb_add_method): clear replaced method from the cache.
|
* eval.c (rb_add_method): clear replaced method from the cache.
|
||||||
|
@ -543,7 +543,7 @@ The variable ruby-indent-level controls the amount of indentation.
|
|||||||
(skip-chars-backward " \t")
|
(skip-chars-backward " \t")
|
||||||
(let ((pos (point)))
|
(let ((pos (point)))
|
||||||
(while (and (re-search-backward "#" bol t)
|
(while (and (re-search-backward "#" bol t)
|
||||||
(= (char-before) ??))
|
(eq (char-before) ??))
|
||||||
(forward-char -1))
|
(forward-char -1))
|
||||||
(skip-chars-backward " \t")
|
(skip-chars-backward " \t")
|
||||||
(and
|
(and
|
||||||
@ -720,12 +720,20 @@ An end of a defun is found by moving forward from the beginning of one."
|
|||||||
("^\\(=\\)begin\\(\\s \\|$\\)" 1 (7 . nil))
|
("^\\(=\\)begin\\(\\s \\|$\\)" 1 (7 . nil))
|
||||||
("^\\(=\\)end\\(\\s \\|$\\)" 1 (7 . nil))))
|
("^\\(=\\)end\\(\\s \\|$\\)" 1 (7 . nil))))
|
||||||
|
|
||||||
|
(cond ((featurep 'xemacs)
|
||||||
(put 'ruby-mode 'font-lock-defaults
|
(put 'ruby-mode 'font-lock-defaults
|
||||||
'((ruby-font-lock-keywords)
|
'((ruby-font-lock-keywords)
|
||||||
nil nil nil
|
nil nil nil
|
||||||
beginning-of-line
|
beginning-of-line
|
||||||
(font-lock-syntactic-keywords
|
(font-lock-syntactic-keywords
|
||||||
. ruby-font-lock-syntactic-keywords)))
|
. ruby-font-lock-syntactic-keywords))))
|
||||||
|
(t
|
||||||
|
(add-hook 'ruby-mode-hook
|
||||||
|
'(lambda ()
|
||||||
|
(make-local-variable 'font-lock-defaults)
|
||||||
|
(setq font-lock-defaults '((ruby-font-lock-keywords) nil nil))
|
||||||
|
(setq font-lock-keywords ruby-font-lock-keywords)
|
||||||
|
(setq font-lock-syntactic-keywords ruby-font-lock-syntactic-keywords)))))
|
||||||
|
|
||||||
(defun ruby-font-lock-docs (limit)
|
(defun ruby-font-lock-docs (limit)
|
||||||
(if (re-search-forward "^=begin\\(\\s \\|$\\)" limit t)
|
(if (re-search-forward "^=begin\\(\\s \\|$\\)" limit t)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user