summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-26 07:50:19 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-26 07:50:19 +0000
commit26f7f7da272cfa4ad4a81758d4caef6528b6efbd (patch)
tree411dc6b87838249835c97249e9b24167b56842f4 /misc
parentb18151cf537680862dec24899a3dee469356db57 (diff)
* misc/ruby-electric.el: Avoid use of the interactive function
`self-insert-command` which fires `post-self-insert-hook` and `post-command-hook`, to make the ruby-electric commands work nicely with those minor modes that make use of them to do similar input assistance, such as electric-pair-mode, autopair-mode and smartparens-mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rw-r--r--misc/ruby-electric.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/ruby-electric.el b/misc/ruby-electric.el
index 632bc4fb76..04eb1494dc 100644
--- a/misc/ruby-electric.el
+++ b/misc/ruby-electric.el
@@ -131,7 +131,7 @@ strings. Note that you must have Font Lock enabled."
(defun ruby-electric-space (arg)
(interactive "P")
- (self-insert-command (prefix-numeric-value arg))
+ (insert (make-string (prefix-numeric-value arg) last-command-event))
(if (ruby-electric-space-can-be-expanded-p)
(save-excursion
(ruby-indent-line t)
@@ -198,11 +198,11 @@ strings. Note that you must have Font Lock enabled."
((and
(null ,arg)
(ruby-electric-is-last-command-char-expandable-punct-p))
- (self-insert-command 1)
+ (insert last-command-event)
,@body)
(t
(setq this-command 'self-insert-command)
- (self-insert-command (prefix-numeric-value ,arg)))))
+ (insert (make-string (prefix-numeric-value ,arg) last-command-event)))))
(defun ruby-electric-curlies(arg)
(interactive "P")
@@ -294,7 +294,7 @@ strings. Note that you must have Font Lock enabled."
(ruby-electric-cua-replace-region))
(arg
(setq this-command 'self-insert-command)
- (self-insert-command (prefix-numeric-value arg)))
+ (insert (make-string (prefix-numeric-value arg) last-command-event)))
((and
(eq last-command 'ruby-electric-curlies)
(= last-command-event ?})) ;; {}