summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-03 04:55:35 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-03 04:55:35 +0000
commit22d105a4e26b01fcff0ce35a667c8e395cc09805 (patch)
tree73b38f7c4ca353aa285a5fa0935a142c7a73d16f /misc
parentf7a64812e9aa7e38068f386ba1f66601a93b5554 (diff)
downloadruby-22d105a4e26b01fcff0ce35a667c8e395cc09805.tar.gz
ruby-22d105a4e26b01fcff0ce35a667c8e395cc09805.tar.xz
ruby-22d105a4e26b01fcff0ce35a667c8e395cc09805.zip
* eval.c (method_hash): new method. [ruby-talk:93968]
* eval.c (proc_eq): do not compare dyna_vars. * eval.c (proc_hash): new method. * eval.c (rb_yield_0): protect break/return from within orphan (or lambda) Proc object. * parse.y (yylex): should not allow symbol for invalid global variable (e.g. `:$-)`). [ruby-core:02518] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rw-r--r--misc/ruby-mode.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index a52b00893..dac90ee1a 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -561,8 +561,10 @@ The variable ruby-indent-level controls the amount of indentation.
(defun ruby-indent-size (pos nest)
(+ pos (* (or nest 1) ruby-indent-level)))
+;;; maybe obsolete
(defconst ruby-assign-re "\\s *\\(&&\\|||\\|<<\\|>>\\|[-+*/%&|^]\\)?=\\s *")
+;;; maybe obsolete
(defun ruby-beginning-of-arg (start end)
(save-restriction
(narrow-to-region start (1+ end))
@@ -586,6 +588,7 @@ The variable ruby-indent-level controls the amount of indentation.
(if beg (setq beg nil arg (point))))
((looking-at ruby-operator-re)
(goto-char (match-end 0))
+ (echo "foo %s %s" arg beg)
(if beg (setq beg nil arg (match-end 0))))
((not (eq (char-syntax (char-after)) ?\())
(setq start (point)))))
@@ -731,7 +734,9 @@ The variable ruby-indent-level controls the amount of indentation.
(not (bobp)))
(save-excursion
(widen)
- (ruby-beginning-of-arg (or begin parse-start) (point))
+ (goto-char (or begin parse-start))
+ (skip-syntax-forward " ")
+;; (ruby-beginning-of-arg (or begin parse-start) (point))
(current-column)))
(t
(+ indent ruby-indent-level))))))))
@@ -832,7 +837,9 @@ An end of a defun is found by moving forward from the beginning of one."
(skip-chars-forward ",.:;|&^~=!?\\+\\-\\*")
(looking-at "\\s("))
(goto-char (scan-sexps (point) 1)))
- ((looking-at ruby-block-beg-re)
+ ((and (looking-at ruby-block-beg-re)
+ (not (eq (char-before (point)) ?.))
+ (not (eq (char-before (point)) ?:)))
(ruby-end-of-block)
(forward-word 1))
((looking-at "\\(\\$\\|@@?\\)?\\sw")