ruby-changes:1987
From: ko1@a...
Date: 21 Sep 2007 04:59:59 +0900
Subject: [ruby-changes:1987] nobu - Ruby:r13478 (trunk): * misc/ruby-style.el (ruby-style-label-indent): fix for function top
nobu 2007-09-21 04:58:41 +0900 (Fri, 21 Sep 2007)
New Revision: 13478
Modified files:
trunk/ChangeLog
trunk/misc/ruby-style.el
Log:
* misc/ruby-style.el (ruby-style-label-indent): fix for function top
level labels.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13478&r2=13477
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/misc/ruby-style.el?r1=13478&r2=13477
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/misc/ruby-style.el?r1=13478&r2=13477
Index: ChangeLog
===================================================================
--- ChangeLog (revision 13477)
+++ ChangeLog (revision 13478)
@@ -1,3 +1,8 @@
+Fri Sep 21 04:58:39 2007 Nobuyoshi Nakada <nobu@r...>
+
+ * misc/ruby-style.el (ruby-style-label-indent): fix for function top
+ level labels.
+
Fri Sep 21 02:11:22 2007 Yukihiro Matsumoto <matz@r...>
* re.c (rb_reg_match_m): evaluate a block if match. it would make
Index: misc/ruby-style.el
===================================================================
--- misc/ruby-style.el (revision 13477)
+++ misc/ruby-style.el (revision 13478)
@@ -1,6 +1,23 @@
;;; -*- emacs-lisp -*-
+;;;
+;;; ruby-style.el -
+;;;
;;; C/C++ mode style for Ruby.
+;;;
+;;; $Author$
+;;; $Date$
+;;; created at: Thu Apr 26 13:54:01 JST 2007
+;;;
+(defconst ruby-style-revision "$Revision$"
+ "Ruby style revision string.")
+
+(defconst ruby-style-version
+ (progn
+ (string-match "[0-9.]+" ruby-style-revision)
+ (substring ruby-style-revision (match-beginning 0) (match-end 0)))
+ "Ruby style version number.")
+
(defun ruby-style-case-indent (x)
(save-excursion
(goto-char (cdr x))
@@ -9,9 +26,12 @@
(defun ruby-style-label-indent (x)
(save-excursion
(goto-char (cdr x))
- (backward-up-list)
- (backward-sexp 2)
- (if (looking-at "\\<switch\\>") '/)))
+ (condition-case ()
+ (progn
+ (backward-up-list)
+ (backward-sexp 2)
+ (if (looking-at "\\<switch\\>") '/))
+ (error))))
(require 'cc-styles)
(c-add-style
Property changes on: misc/ruby-style.el
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml