1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* misc/ruby-mode.el (ruby-calculate-indent): arrange deep-indent

closing parenthesis at same column as the opening.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-09-24 16:47:20 +00:00
parent dd5564b5fd
commit 9e12dc5ce9
2 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sun Sep 25 01:46:43 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* misc/ruby-mode.el (ruby-calculate-indent): arrange deep-indent
closing parenthesis at same column as the opening.
Sun Sep 25 01:33:41 2005 Tanaka Akira <akr@m17n.org>
* process.c (proc_setrlimit): make the third argument (rlim_max)

View file

@ -152,7 +152,7 @@
Also ignores spaces after parenthesis when 'space."
:group 'ruby)
(defcustom ruby-deep-indent-paren '(?\( ?\[ t)
(defcustom ruby-deep-indent-paren '(?\( ?\[ ?\] t)
"*Deep indent lists in parenthesis when non-nil. t means continuous line.
Also ignores spaces after parenthesis when 'space."
:group 'ruby)
@ -617,7 +617,11 @@ The variable ruby-indent-level controls the amount of indentation.
(t (setq indent (ruby-indent-size (1- indent) 1))))))
(if (nth 3 state) (goto-char (nth 3 state))
(goto-char parse-start) (back-to-indentation))
(setq indent (ruby-indent-size (current-column) (nth 2 state))))))
(setq indent (ruby-indent-size (current-column) (nth 2 state))))
(and (eq (car (nth 1 state)) paren)
(ruby-deep-indent-paren-p (matching-paren paren))
(search-backward (char-to-string paren))
(setq indent (current-column)))))
((and (nth 2 state) (> (nth 2 state) 0)) ; in nest
(if (null (cdr (nth 1 state)))
(error "invalid nest"))