diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-30 10:11:20 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-30 10:11:20 +0000 |
commit | 6ca6820a56176fe6dde99608acf55b7eef9c0681 (patch) | |
tree | 8c8a5a88367803c93265290b3b3f71f9715b5853 /misc | |
parent | bfea5bc277aa89cbd31f8a0c431f5cf19ce62c36 (diff) |
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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ruby-additional.el | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/misc/ruby-additional.el b/misc/ruby-additional.el index ce40970ec6..9c94d4abe3 100644 --- a/misc/ruby-additional.el +++ b/misc/ruby-additional.el @@ -19,7 +19,6 @@ (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 @@ (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 |