From: nobu.nokada@... Date: 2004-11-14T15:25:22+09:00 Subject: Re: [BUG] ruby.el Hi, At Sun, 14 Nov 2004 01:27:44 +0900, Brian Schr�der wrote in [ruby-talk:120177]: > I noticed that the symbol :/ kills emacs ruby parsing. Does this patch help? Index: misc/ruby-mode.el =================================================================== RCS file: /cvs/ruby/src/ruby/misc/ruby-mode.el,v retrieving revision 1.84 diff -U2 -p -d -r1.84 ruby-mode.el --- misc/ruby-mode.el 29 Oct 2004 08:08:16 -0000 1.84 +++ misc/ruby-mode.el 14 Nov 2004 06:23:30 -0000 @@ -294,8 +294,9 @@ The variable ruby-indent-level controls (defun ruby-special-char-p (&optional pnt) - (let ((c (char-before (or pnt (point))))) + (setq pnt (or pnt (point))) + (let ((c (char-before pnt)) (b (and (< (point-min) pnt) (char-before (1- pnt))))) (cond ((or (eq c ??) (eq c ?$))) - ((eq c ?\\) - (eq (char-before (1- (or pnt (point)))) ??))))) + ((and (eq c ?:) (or (not b) (eq (char-syntax b) ? )))) + ((eq c ?\\) (eq b ??))))) (defun ruby-expr-beg (&optional option) @@ -504,5 +505,9 @@ The variable ruby-indent-level controls (setq depth (1+ depth))) (goto-char pnt)) - ((looking-at ":\\([a-zA-Z_][a-zA-Z_0-9]*\\)?") + ((looking-at ":\\(['\"]\\)\\(\\\\.\\|[^\\\\]\\)*\\1") + (goto-char (match-end 0))) + ((looking-at ":\\([-,.+*/%&|^~<>]=?\\|===?\\|<=>\\)") + (goto-char (match-end 0))) + ((looking-at ":\\([a-zA-Z_][a-zA-Z_0-9]*[!?=]?\\)?") (goto-char (match-end 0))) ((or (looking-at "\\.\\.\\.?") -- Nobu Nakada