From: nobu.nokada@... Date: 2002-03-18T10:25:15+09:00 Subject: Re: Mini Rant: Indenting Hi, At Mon, 18 Mar 2002 04:39:26 +0900, Kent Dahl wrote: > On a related note, is there a fix in the emacs-mode for this quirk: > > def methodname( argument1 = "default1", argument2 = "default2", > argument3 = "default3" ) #AG! Move me one right, wontcha? > puts argument1, argument2, argument3 > end > Since I never put spaces after open parens I don't guess it's a quirk, however, I have a little patch to customize it. Index: misc/ruby-mode.el =================================================================== RCS file: /cvs/ruby/src/ruby/misc/ruby-mode.el,v retrieving revision 1.48 diff -u -2 -p -r1.48 ruby-mode.el --- misc/ruby-mode.el 2002/02/18 05:17:53 1.48 +++ misc/ruby-mode.el 2002/03/03 02:31:08 @@ -69,4 +69,7 @@ "Abbrev table in use in ruby-mode buffers.") +(defcustom ruby-skip-spaces-after-open-parenthesis nil + "Non-nil means spaces after open parenthesis are skipped.") + (define-abbrev-table 'ruby-mode-abbrev-table ()) @@ -368,4 +371,8 @@ The variable ruby-indent-level controls ) ((looking-at "(") + (when ruby-skip-spaces-after-open-parenthesis + (forward-char) + (skip-syntax-forward " ") + (setq pnt (point))) (setq nest (cons (cons (char-after (point)) pnt) nest)) (setq pcol (cons (cons pnt depth) pcol)) -- Nobu Nakada