summaryrefslogtreecommitdiff
path: root/misc/ruby-electric.el
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-17 08:33:01 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-17 08:33:01 +0000
commitf38a2926e0fc431484ce7f5a3b41412259a0513d (patch)
treef40011d956388f86c2fbdaa196b37e07d185f85c /misc/ruby-electric.el
parenta98e343d39c4d7bf1e2190b076720f32d9f298b3 (diff)
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/ruby-electric.el')
-rw-r--r--misc/ruby-electric.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/misc/ruby-electric.el b/misc/ruby-electric.el
index 8eb872d..b8897e7 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)