From a6709bc70c1ddde8f31c1470f06d39f67976d68d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 23 Oct 2012 13:49:24 -0400 Subject: [PATCH] * gud.el (gud-menu-map): Check gdb-active-process is bound. (Bug#12358) --- lisp/ChangeLog | 5 +++++ lisp/progmodes/gud.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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") -- 2.11.4.GIT