* misc/ruby-electric.el (ruby-electric-setup-keymap): Make

backquotes electric as well.  It was listed in
  ruby-electric-expand-delimiters-list but not activated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2013-05-18 17:38:08 +00:00
Родитель 616084fd97
Коммит 041224017c
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -1,4 +1,8 @@
Sun May 19 02:30:00 2013 Akinori MUSHA <knu@iDaemons.org>
Sun May 19 02:33:09 2013 Akinori MUSHA <knu@iDaemons.org>
* misc/ruby-electric.el (ruby-electric-setup-keymap): Make
backquotes electric as well. It was listed in
ruby-electric-expand-delimiters-list but not activated.
* misc/ruby-electric.el (ruby-electric-delete-backward-char):
Introduce electric DEL that deletes what the previous electric

Просмотреть файл

@ -120,6 +120,7 @@ strings. Note that you must have Font Lock enabled."
(define-key ruby-mode-map "[" 'ruby-electric-matching-char)
(define-key ruby-mode-map "\"" 'ruby-electric-matching-char)
(define-key ruby-mode-map "\'" 'ruby-electric-matching-char)
(define-key ruby-mode-map "`" 'ruby-electric-matching-char)
(define-key ruby-mode-map "}" 'ruby-electric-closing-char)
(define-key ruby-mode-map ")" 'ruby-electric-closing-char)
(define-key ruby-mode-map "]" 'ruby-electric-closing-char)
@ -279,7 +280,7 @@ strings. Note that you must have Font Lock enabled."
(ruby-electric-string-at-point-p)))
(save-excursion (insert closing))
(and (eq last-command 'ruby-electric-matching-char)
(char-equal (following-char) closing) ;; repeated ' or "
(char-equal (following-char) closing) ;; repeated quotes
(delete-forward-char 1))
(setq this-command 'self-insert-command)))
((ruby-electric-code-at-point-p)