* lisp/progmodes/ruby-mode.el (ruby-mode-menu): Add a menu
authorJohn Anthony <john@jo.hnanthony.com>
Fri, 25 Oct 2013 02:38:39 +0000 (19:38 -0700)
committerGlenn Morris <rgm@gnu.org>
Fri, 25 Oct 2013 02:38:39 +0000 (19:38 -0700)
Fixes: debbugs:15600

lisp/ChangeLog
lisp/progmodes/ruby-mode.el

index 0bd907c..5bd6b2b 100644 (file)
@@ -1,6 +1,8 @@
 2013-10-25  John Anthony  <john@jo.hnanthony.com>
 
-       * progmodes/inf-lisp.el (inferior-lisp-menu): Add menu.  (Bug#15599)
+       * progmodes/ruby-mode.el (ruby-mode-menu): Add a menu.  (Bug#15600)
+
+       * progmodes/inf-lisp.el (inferior-lisp-menu): Add a menu.  (Bug#15599)
 
 2013-10-25  Glenn Morris  <rgm@gnu.org>
 
index 5f553b9..1ea6c3c 100644 (file)
@@ -160,6 +160,22 @@ This should only be called after matching against `ruby-here-doc-beg-re'."
     map)
   "Keymap used in Ruby mode.")
 
+(easy-menu-define
+  ruby-mode-menu
+  ruby-mode-map
+  "Ruby Mode Menu"
+  '("Ruby"
+    ["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)]
+    ["Forward Sexp" ruby-forward-sexp
+     :active (not ruby-use-smie)]
+    ["Indent Sexp" ruby-indent-sexp
+     :active (not ruby-use-smie)]))
+
 (defvar ruby-mode-syntax-table
   (let ((table (make-syntax-table)))
     (modify-syntax-entry ?\' "\"" table)