From: Glenn Morris Date: Tue, 23 Oct 2012 17:49:24 +0000 (-0400) Subject: * gud.el (gud-menu-map): Check gdb-active-process is bound. (Bug#12358) X-Git-Tag: emacs-24.2.90~209^2~102 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a6709bc70c1ddde8f31c1470f06d39f67976d68d;p=emacs.git * gud.el (gud-menu-map): Check gdb-active-process is bound. (Bug#12358) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 593b2a935b7..2d3bd095278 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-10-23 Glenn Morris + + * progmodes/gud.el (gud-menu-map): + Check gdb-active-process is bound. (Bug#12358) + 2012-10-23 Stefan Monnier * repeat.el (repeat): Set real-this-command (bug#12232). diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 719471278a8..13eac8392a2 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -148,7 +148,8 @@ Used to gray out relevant toolbar icons.") ([run] menu-item "Run" gud-run :enable (not gud-running) :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) - ([go] menu-item (if gdb-active-process "Continue" "Run") gud-go + ([go] menu-item (if (bound-and-true-p gdb-active-process) + "Continue" "Run") gud-go :visible (and (eq gud-minor-mode 'gdbmi) (gdb-show-run-p))) ([stop] menu-item "Stop" gud-stop-subjob @@ -178,7 +179,7 @@ Used to gray out relevant toolbar icons.") '(gdbmi gdb dbx xdb jdb pdb))) ([pp] menu-item "Print S-expression" gud-pp :enable (and (not gud-running) - gdb-active-process) + (bound-and-true-p gdb-active-process)) :visible (and (string-equal (buffer-local-value 'gud-target-name gud-comint-buffer) "emacs")