aboutsummaryrefslogtreecommitdiffstats
path: root/misc/ruby-electric.el
Commit message (Collapse)AuthorAgeFilesLines
* Import ruby-electric.el version 2.2.3 from upstreamknu2015-04-241-9/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-electric.el: Import version 2.2.2 fromknu2015-01-261-7/+14
| | | | | | | | https://github.com/knu/ruby-electric.el. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Import ruby-electric.el 2.2.1.knu2015-01-211-79/+151
| | | | | | | | | | * misc/ruby-electric.el: Import version 2.2.1 from https://github.com/knu/ruby-electric.el. Improve compatibility with and optimize for Emacs 24.4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* misc/ruby-electric.el: Import version 2.1.1.knu2013-12-171-4/+6
| | | | | | | | | | | * ruby-electric-delete-backward-char: Enable support for number prefix. * ruby-electric-curlies: Fix electric operation after an open curly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-electric.el: Import ruby-electric.el 2.1 fromknu2013-10-281-12/+33
| | | | | | | | | | | | | | | | https://github.com/knu/ruby-electric.el. * Hitting the newline-and-indent key within a comment fires comment-indent-new-line. * Introduce a new feature `ruby-electric-autoindent-on-closing-char`. * Fix fallback behavior of ruby-electric-space/return that caused error with auto-complete. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Import ruby-electric.el 2.0.1, a bug fix release.knu2013-10-111-14/+15
| | | | | | | | | | | | | | | | * misc/ruby-electric.el: Import ruby-electric.el 2.0.1 which fixes a bug and a flaw with auto-end introduced in the revamp. * ruby-forward-sexp is inappropriate here because it moves the cursor past the keyword. * Fix a reversed looking-back check in ruby-electric--block-beg-keyword-at-point-p. * Do not add end again if space or return is hit repeatedly after a block beginning keyword. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Import ruby-electric.el 2.0.knu2013-10-111-174/+243
| | | | | | | | | | | | | | | | | | | | | | | | | * misc/ruby-electric.el: Import ruby-electric.el 2.0 from https://github.com/knu/ruby-electric.el which integrates changes from another fork by @qoobaa. * Allow ruby-electric-mode to be disabled by introducing a dedicated key map. Electric key bindings are now defined in ruby-electric-mode-map instead of overwriting ruby-mode-map. * Add ruby-electric-mode-hook. * Use a remap in binding ruby-electric-delete-backward-char. * Totally revamp electric keywords and then introduce electric return. Modifier keywords are now properly detected making use of ruby-mode's indentation level calculator, and * block-mid keywords (then, else, elsif, when, rescue and ensure) also become electric with automatic reindentation. * Add standarized comments for ELPA integration. * Fix interaction with smartparens-mode by disabling its end keyword completion, since ruby-electric has become more clever at it. * The custom variable `ruby-electric-keywords` is changed to `ruby-electric-keywords-alist`, allowing user to fine-grained configuration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Make ruby-electric play nicely with smartparens-mode.knu2013-10-071-22/+58
| | | | | | | | | | | * misc/ruby-electric.el (ruby-electric-space-can-be-expanded-p): Return nil to avoid "end" insertion when in smartparens-mode that is configured to insert "end" for the same keyword. * misc/ruby-electric.el (ruby-electric-keywords): New custom variable to replace `ruby-electric-simple-keywords-re` with. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-electric.el (ruby-electric-delete-backward-char): Addknu2013-09-261-17/+16
| | | | | | | | | | | | support for smartparen-mode. * misc/ruby-electric.el (ruby-electric-cua-replace-region-maybe) (ruby-electric-cua-delete-region-maybe): New functions that combine `ruby-electric-cua-*-region` with `ruby-electric-cua-*-region-p`, using a slightly better way to detect if it is in cua-mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-electric.el: Avoid use of the interactive functionknu2013-09-261-4/+4
| | | | | | | | | | `self-insert-command` which fires `post-self-insert-hook` and `post-command-hook`, to make the ruby-electric commands work nicely with those minor modes that make use of them to do similar input assistance, such as electric-pair-mode, autopair-mode and smartparens-mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add magic autoload comments to misc/*.el.knu2013-09-031-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-electric.el (ruby-electric-delete-backward-char): Useknu2013-05-191-1/+1
| | | | | | | | delete-char instead of delete-backward-char, which is an interactive function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-electric.el (ruby-electric-setup-keymap): Makeknu2013-05-181-1/+2
| | | | | | | 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
* * misc/ruby-electric.el (ruby-electric-delete-backward-char):knu2013-05-181-1/+30
| | | | | | | Introduce electric DEL that deletes what the previous electric command has input. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-electric.el (ruby-electric-matching-char): Makeknu2013-05-181-1/+14
| | | | | | electric quotes work again at the end of buffer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-electric.el (ruby-electric-matching-char): Do not putknu2013-05-171-10/+13
| | | | | | | | a closing quote when the quote typed does not start a string, as in $', ?\' or ?\". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* misc/ruby-electric.el: Decrease the excess voltage of automatic matching.knu2013-04-151-4/+37
| | | | | | | | | | * misc/ruby-electric.el (ruby-electric-closing-char): New interactive function bound to closing characters. Typing one of those closing characters right after the matching counterpart cancels the effect of automatic closing. For example, typing "{" followed by "}" simply makes "{}" instead of "{ } }". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* misc/ruby-electric.el: Minor refactoring.knu2013-04-151-51/+51
| | | | | | | * misc/ruby-electric.el (ruby-electric-insert): Check ruby-electric-is-last-command-char-expandable-punct-p here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-04-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Improve ruby-electric-mode.knu2013-04-061-21/+67
| | | | | | | | | | | | | | | | | * misc/ruby-electric.el (ruby-electric-hash): New electric function that expands a hash sign inside a string or regexp to "#{}". * misc/ruby-electric.el (ruby-electric-curlies): Do not insert spaces inside when the curly brace is a delimiter of %r, %w, etc. * misc/ruby-electric.el (ruby-electric-curlies): Insert another space before a closing curly brace when ruby-electric-newline-before-closing-bracket is nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* misc/ruby-electric.el: Avoid electric insertion in some cases.knu2013-02-231-32/+48
| | | | | | | | | | | | | * misc/ruby-electric.el (ruby-electric-curlies) (ruby-electric-matching-char, ruby-electric-bar): Avoid electric insertion when there is a prefix argument. * misc/ruby-electric.el (ruby-electric-insert) (ruby-electric-cua-replace-region-p) (ruby-electric-cua-replace-region): Avoid electric insertion and fall back when cua-mode is enabled and a region is active. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix ruby-electric-curlies.knu2013-01-221-8/+5
| | | | | | | * 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
* ruby-electric.el (ruby-electric-curlies): Automatically indent "}".knu2012-12-281-2/+5
| | | | | | | | * misc/ruby-electric.el (ruby-electric-curlies): Automatically indent closing curly brackets when ruby-electric-newline-before-closing-bracket is true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby-electric.el: use kill-regionnobu2012-12-011-1/+1
| | | | | | | * misc/ruby-electric.el (ruby-electric-curlies): use kill-region instead of interactive command delete-backward-char. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby-electric.el: fix #198nobu2012-10-231-2/+2
| | | | | | | | | * misc/ruby-electric.el using variable `last-command-event' instead of obsolete `last-command-char', so that work with Emacs trunk. a patch by Victor Deryagin <vderyagin AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-electric.el: remove trailing spaces.nobu2011-03-081-6/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/*.el: untabify, for interal consistency and consistencymatz2008-09-061-39/+39
| | | | | | with standard Emacs elisp files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-mode.el, misc/ruby-electric.el: use regexp-opt wherematz2008-09-061-2/+2
| | | | | | possible for more efficient regexps. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add ruby-electric.elzsombor2005-03-061-0/+200
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e