changeset 76073:9c80ddcdba82

(idlwave-shell-set-bp): Fix setting condition/count on disabled BPs.
author J.D. Smith <jdsmith@as.arizona.edu>
date Thu, 22 Feb 2007 20:18:17 +0000
parents 08f453b60dc2
children 5978a80d504e
files lisp/progmodes/idlw-shell.el
diffstat 1 files changed, 13 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/idlw-shell.el	Thu Feb 22 20:17:52 2007 +0000
+++ b/lisp/progmodes/idlw-shell.el	Thu Feb 22 20:18:17 2007 +0000
@@ -3545,22 +3545,21 @@
   (idlwave-shell-module-source-query (idlwave-shell-bp-get bp 'module)
 				     (idlwave-shell-bp-get bp 'type))
   (let*
-      ((arg (idlwave-shell-bp-get bp 'count))
-       (key (cond
-              ((not (and arg (numberp arg))) "")
-              ((= arg 1)
-               ",/once")
-              ((> arg 1)
-               (format ",after=%d" arg))))
+      ((count (idlwave-shell-bp-get bp 'count))
        (condition (idlwave-shell-bp-get bp 'condition))
        (disabled (idlwave-shell-bp-get bp 'disabled))
-       (key (concat key 
-		    (if condition (concat ",CONDITION=\"" condition "\""))))
-       ;; IDL can't simultaneously set a condition and disable a
-       ;; breakpoint, but it does keep both of these when resetting
-       ;; the same BP.  We assume DISABLE and CONDITION are not set
-       ;; together for a newly created breakpoint.
-       (key (concat key (if (and disabled (not condition)) ",/DISABLE")))
+       (key (concat (if (and count (numberp count))
+			(cond
+			 ((= count 1) ",/once")
+			 ((> count 1) (format ",after=%d" count))))
+		    (if condition (concat ",CONDITION=\"" condition "\""))
+		    ;; IDL can't simultaneously set a condition/count
+		    ;; and disable a breakpoint, but it does keep both
+		    ;; of these when resetting the same BP.  We assume
+		    ;; DISABLE and CONDITION/COUNT are not set
+		    ;; together for a newly created breakpoint.
+		    (if (and disabled (not condition) (not count))
+			    ",/DISABLE")))
        (line (idlwave-shell-bp-get bp 'line)))
     (idlwave-shell-send-command
      (concat "breakpoint,'"