[前][次][番号順一覧][スレッド一覧]

ruby-changes:37331

From: knu <ko1@a...>
Date: Mon, 26 Jan 2015 18:07:08 +0900 (JST)
Subject: [ruby-changes:37331] knu:r49412 (trunk): * misc/ruby-electric.el: Import version 2.2.2 from

knu	2015-01-26 18:06:54 +0900 (Mon, 26 Jan 2015)

  New Revision: 49412

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49412

  Log:
    * misc/ruby-electric.el: Import version 2.2.2 from
      https://github.com/knu/ruby-electric.el.

  Modified files:
    trunk/ChangeLog
    trunk/misc/ruby-electric.el
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 49411)
+++ ChangeLog	(revision 49412)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jan 26 18:06:03 2015  Akinori MUSHA  <knu@i...>
+
+	* misc/ruby-electric.el: Import version 2.2.2 from
+	  https://github.com/knu/ruby-electric.el.
+
 Mon Jan 26 11:37:49 2015  Dave Stevens  <dave@c...>
 
 	* string.c (str_make_independent_expand): terminate String when
Index: misc/ruby-electric.el
===================================================================
--- misc/ruby-electric.el	(revision 49411)
+++ misc/ruby-electric.el	(revision 49412)
@@ -10,7 +10,7 @@ https://github.com/ruby/ruby/blob/trunk/misc/ruby-electric.el#L10
 ;; URL: https://github.com/knu/ruby-electric.el
 ;; Keywords: languages ruby
 ;; License: The same license terms as Ruby
-;; Version: 2.2.1
+;; Version: 2.2.2
 
 ;;; Commentary:
 ;;
@@ -161,11 +161,6 @@ cons, ACTION can be set to one of the fo https://github.com/ruby/ruby/blob/trunk/misc/ruby-electric.el#L161
                          "$"))))
   :group 'ruby-electric)
 
-(defcustom ruby-electric-simple-keywords-re nil
-  "Obsolete and ignored.  Customize `ruby-electric-keywords-alist'
-instead."
-  :type 'regexp :group 'ruby-electric)
-
 (defvar ruby-electric-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map " " 'ruby-electric-space/return)
@@ -274,7 +269,7 @@ enabled." https://github.com/ruby/ruby/blob/trunk/misc/ruby-electric.el#L269
                   (ruby-indent-line)
                   (save-excursion
                     (newline)
-                    (ruby-insert-end)))
+                    (ruby-electric-end)))
                  ((eq action 'reindent)
                   (ruby-indent-line)))
            (ruby-electric-space/return-fallback)))
@@ -542,6 +537,18 @@ enabled." https://github.com/ruby/ruby/blob/trunk/misc/ruby-electric.el#L537
               (delete-char 1))))
   (delete-char (- arg)))
 
+(put 'ruby-electric-delete-backward-char 'delete-selection 'supersede)
+
+(defun ruby-electric-end ()
+  (interactive)
+  (if (eq (char-syntax (preceding-char)) ?w)
+      (insert " "))
+  (insert "end")
+  (save-excursion
+    (if (eq (char-syntax (following-char)) ?w)
+        (insert " "))
+    (ruby-indent-line t)))
+
 (provide 'ruby-electric)
 
 ;;; ruby-electric.el ends here

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]