Permalink
Browse files

ruby-electric.el: use kill-region

* misc/ruby-electric.el (ruby-electric-curlies): use kill-region
  instead of interactive command delete-backward-char.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent 69f2f84 commit f28cfec1eeb4ec8c8d166a711b15f973a590e709 @nobu nobu committed Dec 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 ruby-electric.el
View
@@ -174,7 +174,7 @@ strings. Note that you must have Font Lock enabled."
(if (eq last-command-event ?{)
(save-excursion
(when (not (char-equal ?\# (preceding-char)))
- (delete-backward-char)
+ (kill-region (point) (1- (point)))
(insert "#"))))
(save-excursion
(backward-char 1)

0 comments on commit f28cfec

Please sign in to comment.