diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-17 08:33:01 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-17 08:33:01 +0000 |
commit | f38a2926e0fc431484ce7f5a3b41412259a0513d (patch) | |
tree | f40011d956388f86c2fbdaa196b37e07d185f85c /misc | |
parent | a98e343d39c4d7bf1e2190b076720f32d9f298b3 (diff) | |
download | ruby-f38a2926e0fc431484ce7f5a3b41412259a0513d.tar.gz |
misc/ruby-electric.el: Import version 2.1.1.
* ruby-electric-delete-backward-char: Enable support for number
prefix.
* ruby-electric-curlies: Fix electric operation after an open
curly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ruby-electric.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/misc/ruby-electric.el b/misc/ruby-electric.el index 8eb872d909..b8897e7163 100644 --- a/misc/ruby-electric.el +++ b/misc/ruby-electric.el @@ -10,7 +10,7 @@ ;; URL: https://github.com/knu/ruby-electric.el ;; Keywords: languages ruby ;; License: The same license terms as Ruby -;; Version: 2.1 +;; Version: 2.1.1 ;;; Commentary: ;; @@ -366,7 +366,9 @@ enabled." (t (insert "#") (forward-char 1) - (insert "}")))))))) + (insert "}"))))) + (t + (setq this-command 'self-insert-command))))) (defun ruby-electric-hash(arg) (interactive "*P") @@ -447,7 +449,7 @@ enabled." (setq this-command 'self-insert-command))))) (defun ruby-electric-delete-backward-char(arg) - (interactive "*P") + (interactive "*p") (cond ((memq last-command '(ruby-electric-matching-char ruby-electric-bar)) (delete-char 1)) @@ -466,7 +468,7 @@ enabled." ((eq last-command 'ruby-electric-hash) (and (char-equal (preceding-char) ?{) (delete-char 1)))) - (delete-char -1)) + (delete-char (- arg))) (provide 'ruby-electric) |