зеркало из 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>
|
Mon Jan 21 15:41:33 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* tool/mkconfig.rb: BASERUBY is transient at core build.
|
* 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)
|
((ruby-electric-string-at-point-p)
|
||||||
(if (eq last-command-event ?{)
|
(if (eq last-command-event ?{)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(when (not (char-equal ?\# (preceding-char)))
|
(backward-char 1)
|
||||||
(kill-region (point) (1- (point)))
|
(or (char-equal ?\# (preceding-char))
|
||||||
(insert "#"))))
|
(insert "#"))
|
||||||
(save-excursion
|
(forward-char 1)
|
||||||
(backward-char 1)
|
(insert "}")))))))
|
||||||
(when (char-equal ?\# (preceding-char))
|
|
||||||
(forward-char 1)
|
|
||||||
(insert "}")))))))
|
|
||||||
|
|
||||||
(defun ruby-electric-matching-char(arg)
|
(defun ruby-electric-matching-char(arg)
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
|
Загрузка…
Ссылка в новой задаче