diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2013-10-25 08:35:56 +0400 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2013-10-25 08:35:56 +0400 |
commit | 963ce6361af7f8b7aefb63e7a50956e497020b12 (patch) | |
tree | 9ef5be20bc05229b733784a39761bad83f7e9b89 /lisp/progmodes/ruby-mode.el | |
parent | f73754c9234b53d0def73a3d0c79d58180b095b6 (diff) | |
download | emacs-963ce6361af7f8b7aefb63e7a50956e497020b12.tar.gz emacs-963ce6361af7f8b7aefb63e7a50956e497020b12.tar.bz2 emacs-963ce6361af7f8b7aefb63e7a50956e497020b12.zip |
* lisp/progmodes/ruby-mode.el (ruby-mode-menu): Use proper
capitalization. Use :visible instead of :active. Fix
`ruby-indent-exp' reference. Add menu items for the generic
commands that are used with SMIE.
(ruby-do-end-to-brace): Insert space after `{'.
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 1ea6c3c7c99..dbca0d4dd26 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -165,16 +165,22 @@ This should only be called after matching against `ruby-here-doc-beg-re'." ruby-mode-map "Ruby Mode Menu" '("Ruby" - ["Beginning Of Block" ruby-beginning-of-block t] - ["End Of Block" ruby-end-of-block t] + ["Beginning of Block" ruby-beginning-of-block t] + ["End of Block" ruby-end-of-block t] ["Toggle Block" ruby-toggle-block t] "--" ["Backward Sexp" ruby-backward-sexp - :active (not ruby-use-smie)] + :visible (not ruby-use-smie)] + ["Backward Sexp" backward-sexp + :visible ruby-use-smie] ["Forward Sexp" ruby-forward-sexp - :active (not ruby-use-smie)] - ["Indent Sexp" ruby-indent-sexp - :active (not ruby-use-smie)])) + :visible (not ruby-use-smie)] + ["Forward Sexp" forward-sexp + :visible ruby-use-smie] + ["Indent Sexp" ruby-indent-exp + :visible (not ruby-use-smie)] + ["Indent Sexp" prog-indent-sexp + :visible ruby-use-smie])) (defvar ruby-mode-syntax-table (let ((table (make-syntax-table))) @@ -1461,7 +1467,8 @@ See `add-log-current-defun-function'." (insert "}") (goto-char orig) (delete-char 2) - (insert "{") + ;; Maybe this should be customizable, let's see if anyone asks. + (insert "{ ") (setq beg-marker (point-marker)) (when (looking-at "\\s +|") (delete-char (- (match-end 0) (match-beginning 0) 1)) |