1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* misc/ruby-electric.el: Import version 2.2.2 from

https://github.com/knu/ruby-electric.el.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2015-01-26 09:06:54 +00:00
parent ec723e30bc
commit 210357fad0
2 changed files with 19 additions and 7 deletions

View file

@ -1,3 +1,8 @@
Mon Jan 26 18:06:03 2015 Akinori MUSHA <knu@iDaemons.org>
* misc/ruby-electric.el: Import version 2.2.2 from
https://github.com/knu/ruby-electric.el.
Mon Jan 26 11:37:49 2015 Dave Stevens <dave@crowdlab.com>
* string.c (str_make_independent_expand): terminate String when

View file

@ -10,7 +10,7 @@
;; URL: https://github.com/knu/ruby-electric.el
;; Keywords: languages ruby
;; License: The same license terms as Ruby
;; Version: 2.2.1
;; Version: 2.2.2
;;; Commentary:
;;
@ -161,11 +161,6 @@ cons, ACTION can be set to one of the following values:
"$"))))
:group 'ruby-electric)
(defcustom ruby-electric-simple-keywords-re nil
"Obsolete and ignored. Customize `ruby-electric-keywords-alist'
instead."
:type 'regexp :group 'ruby-electric)
(defvar ruby-electric-mode-map
(let ((map (make-sparse-keymap)))
(define-key map " " 'ruby-electric-space/return)
@ -274,7 +269,7 @@ enabled."
(ruby-indent-line)
(save-excursion
(newline)
(ruby-insert-end)))
(ruby-electric-end)))
((eq action 'reindent)
(ruby-indent-line)))
(ruby-electric-space/return-fallback)))
@ -542,6 +537,18 @@ enabled."
(delete-char 1))))
(delete-char (- arg)))
(put 'ruby-electric-delete-backward-char 'delete-selection 'supersede)
(defun ruby-electric-end ()
(interactive)
(if (eq (char-syntax (preceding-char)) ?w)
(insert " "))
(insert "end")
(save-excursion
(if (eq (char-syntax (following-char)) ?w)
(insert " "))
(ruby-indent-line t)))
(provide 'ruby-electric)
;;; ruby-electric.el ends here