зеркало из https://github.com/github/ruby.git
Fix ruby-electric-curlies.
* misc/ruby-electric.el (ruby-electric-curlies): Fix the bug where an open curly is always replaced with a hash sign. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
7d6f22f4cd
Коммит
9545483ad3
|
@ -1,3 +1,8 @@
|
|||
Tue Jan 22 22:58:03 2013 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* misc/ruby-electric.el (ruby-electric-curlies): Fix the bug where
|
||||
an open curly is always replaced with a hash sign.
|
||||
|
||||
Mon Jan 21 15:41:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* tool/mkconfig.rb: BASERUBY is transient at core build.
|
||||
|
|
|
@ -176,14 +176,11 @@ strings. Note that you must have Font Lock enabled."
|
|||
((ruby-electric-string-at-point-p)
|
||||
(if (eq last-command-event ?{)
|
||||
(save-excursion
|
||||
(when (not (char-equal ?\# (preceding-char)))
|
||||
(kill-region (point) (1- (point)))
|
||||
(insert "#"))))
|
||||
(save-excursion
|
||||
(backward-char 1)
|
||||
(when (char-equal ?\# (preceding-char))
|
||||
(forward-char 1)
|
||||
(insert "}")))))))
|
||||
(backward-char 1)
|
||||
(or (char-equal ?\# (preceding-char))
|
||||
(insert "#"))
|
||||
(forward-char 1)
|
||||
(insert "}")))))))
|
||||
|
||||
(defun ruby-electric-matching-char(arg)
|
||||
(interactive "P")
|
||||
|
|
Загрузка…
Ссылка в новой задаче