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

ruby-changes:31396

From: knu <ko1@a...>
Date: Wed, 30 Oct 2013 19:11:25 +0900 (JST)
Subject: [ruby-changes:31396] knu:r43475 (trunk): misc/ruby-additional.el: Remove functions implemented in Emacs 24.3.

knu	2013-10-30 19:11:20 +0900 (Wed, 30 Oct 2013)

  New Revision: 43475

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

  Log:
    misc/ruby-additional.el: Remove functions implemented in Emacs 24.3.
    
    * misc/ruby-additional.el (ruby-brace-to-do-end)
      (ruby-do-end-to-brace, ruby-toggle-block): Remove functions that
      are already in the latest released version of Emacs (24.3).
      [Bug #7565]

  Modified files:
    trunk/ChangeLog
    trunk/misc/ruby-additional.el
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43474)
+++ ChangeLog	(revision 43475)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Oct 30 19:07:57 2013  Akinori MUSHA  <knu@i...>
+
+	* misc/ruby-additional.el (ruby-brace-to-do-end)
+	  (ruby-do-end-to-brace, ruby-toggle-block): Remove functions that
+	  are already in the latest released version of Emacs (24.3).
+	  [Bug #7565]
+
 Wed Oct 30 12:44:28 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* win32/Makefile.sub (config.status): add missing variables,
Index: misc/ruby-additional.el
===================================================================
--- misc/ruby-additional.el	(revision 43474)
+++ misc/ruby-additional.el	(revision 43475)
@@ -19,7 +19,6 @@ https://github.com/ruby/ruby/blob/trunk/misc/ruby-additional.el#L19
 (eval-after-load 'ruby-mode
   '(progn
      (define-key ruby-mode-map "\C-c\C-e" 'ruby-insert-end)
-     (define-key ruby-mode-map "\C-c{" 'ruby-toggle-block)
 
      (defun ruby-insert-end ()
        (interactive)
@@ -32,47 +31,6 @@ https://github.com/ruby/ruby/blob/trunk/misc/ruby-additional.el#L31
          (ruby-indent-line t)
          (end-of-line)))
 
-     (defun ruby-brace-to-do-end ()
-       (when (looking-at "{")
-         (let ((orig (point)) (end (progn (ruby-forward-sexp) (point))))
-           (when (eq (preceding-char) ?\})
-             (delete-char -1)
-             (if (eq (char-syntax (preceding-char)) ?w)
-                 (insert " "))
-             (insert "end")
-             (if (eq (char-syntax (following-char)) ?w)
-                 (insert " "))
-             (goto-char orig)
-             (delete-char 1)
-             (if (eq (char-syntax (preceding-char)) ?w)
-                 (insert " "))
-             (insert "do")
-             (when (looking-at "\\sw\\||")
-               (insert " ")
-               (backward-char))
-             t))))
-
-     (defun ruby-do-end-to-brace ()
-       (when (and (or (bolp)
-                      (not (memq (char-syntax (preceding-char)) '(?w ?_))))
-                  (looking-at "\\<do\\(\\s \\|$\\)"))
-         (let ((orig (point)) (end (progn (ruby-forward-sexp) (point))))
-           (backward-char 3)
-           (when (looking-at ruby-block-end-re)
-             (delete-char 3)
-             (insert "}")
-             (goto-char orig)
-             (delete-char 2)
-             (insert "{")
-             (if (looking-at "\\s +|")
-                 (delete-char (- (match-end 0) (match-beginning 0) 1)))
-             t))))
-
-     (defun ruby-toggle-block ()
-       (interactive)
-       (or (ruby-brace-to-do-end)
-           (ruby-do-end-to-brace)))
-
      (defconst ruby-default-encoding-map
        '((us-ascii       . nil)       ;; Do not put coding: us-ascii
          (utf-8          . nil)       ;; Do not put coding: utf-8

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

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