]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid duplicate gud menu items with gdb-mi
authorGlenn Morris <rgm@gnu.org>
Sat, 4 Mar 2017 00:46:57 +0000 (19:46 -0500)
committerGlenn Morris <rgm@gnu.org>
Sat, 4 Mar 2017 00:46:57 +0000 (19:46 -0500)
* lisp/progmodes/gud.el (gud-menu-map): Avoid duplicate "Run"
entries in gdbmi mode.  (Bug#23923)

lisp/progmodes/gud.el

index 1301758ea12de82e7596e13c3b68455552d6b8dd..7ab1442c6481f2e176f6bb8dad25b8dcb1648c9a 100644 (file)
@@ -146,7 +146,11 @@ Used to gray out relevant toolbar icons.")
     ([refresh] "Refresh" . gud-refresh)
     ([run]     menu-item "Run" gud-run
                   :enable (not gud-running)
-                 :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb)))
+                 :visible (or (memq gud-minor-mode '(gdb dbx jdb))
+                              (and (eq gud-minor-mode 'gdbmi)
+                                   (or (not (gdb-show-run-p))
+                                       (bound-and-true-p
+                                        gdb-active-process)))))
     ([go]      menu-item (if (bound-and-true-p gdb-active-process)
                              "Continue" "Run") gud-go
                  :visible (and (eq gud-minor-mode 'gdbmi)