summaryrefslogtreecommitdiff
path: root/lisp/progmodes/gdb-ui.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-11-11 00:56:44 +0000
committerMiles Bader <miles@gnu.org>2007-11-11 00:56:44 +0000
commitf23d76bdefbd4c06e14d69e99e50d35ce91c8226 (patch)
treeded28d1da6df2d0135514bac83074f4ca1c9099a /lisp/progmodes/gdb-ui.el
parente2d092da5980a7d05a5428074f8eb4925fa801e8 (diff)
parenta457417ee5ba797ab1c91d35ee957bb7a7f8d4b6 (diff)
downloademacs-f23d76bdefbd4c06e14d69e99e50d35ce91c8226.tar.gz
emacs-f23d76bdefbd4c06e14d69e99e50d35ce91c8226.tar.bz2
emacs-f23d76bdefbd4c06e14d69e99e50d35ce91c8226.zip
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-283
Diffstat (limited to 'lisp/progmodes/gdb-ui.el')
-rw-r--r--lisp/progmodes/gdb-ui.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index c6ae98c5b12..0d1a4b05d65 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -947,6 +947,12 @@ Changed values are highlighted with the face `font-lock-warning-face'."
:group 'gud
:version "22.1")
+(defcustom gdb-delete-out-of-scope t
+ "If non-nil delete watch expressions automatically when they go out of scope."
+ :type 'boolean
+ :group 'gud
+ :version "22.2")
+
(defun gdb-speedbar-expand-node (text token indent)
"Expand the node the user clicked on.
TEXT is the text of the button we clicked on, a + or - item.
@@ -3515,7 +3521,9 @@ in_scope=\"\\(.*?\\)\".*?}")
(when var
(let ((match (match-string 3)))
(cond ((string-equal match "false")
- (setcar (nthcdr 5 var) 'out-of-scope))
+ (if gdb-delete-out-of-scope
+ (gdb-var-delete-1 varnum)
+ (setcar (nthcdr 5 var) 'out-of-scope)))
((string-equal match "true")
(setcar (nthcdr 5 var) 'changed)
(setcar (nthcdr 4 var)