зеркало из https://github.com/github/ruby.git
* 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:
Родитель
616084fd97
Коммит
041224017c
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче