Function: idlwave-shell-set-bp

idlwave-shell-set-bp is a byte-compiled function defined in idlw-shell.el.gz.

Signature

(idlwave-shell-set-bp BP &optional NO-SHOW)

Documentation

Try to set a breakpoint BP.

The breakpoint will be placed at the beginning of the statement on the line specified by BP or at the next IDL statement if that line is not a statement. Determines IDL's internal representation for the breakpoint, which may have occurred at a different line than specified. If NO-SHOW is non-nil, don't do any updating.

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/idlw-shell.el.gz
(defun idlwave-shell-set-bp (bp &optional no-show)
  "Try to set a breakpoint BP.
The breakpoint will be placed at the beginning of the statement on the
line specified by BP or at the next IDL statement if that line is not
a statement.  Determines IDL's internal representation for the
breakpoint, which may have occurred at a different line than
specified.  If NO-SHOW is non-nil, don't do any updating."
  ;; Get and save the old breakpoints
  (idlwave-shell-send-command
   idlwave-shell-bp-query
   `(progn
     (idlwave-shell-filter-bp (quote ,no-show))
     (setq idlwave-shell-old-bp idlwave-shell-bp-alist))
   'hide)

  ;; Get sources for this routine in the sources list
  (idlwave-shell-module-source-query (idlwave-shell-bp-get bp 'module)
				     (idlwave-shell-bp-get bp 'type))
  (let*
      ((count (idlwave-shell-bp-get bp 'count))
       (condition (idlwave-shell-bp-get bp 'condition))
       (disabled (idlwave-shell-bp-get bp 'disabled))
       (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,'"
	     (idlwave-shell-sources-bp bp) "',"
	     (if (integerp line) (setq line (int-to-string line)))
	     key)
     ;; Check for failure and adjust breakpoint to match IDL's list
     `(progn
	(if (idlwave-shell-set-bp-check (quote ,bp))
	    (idlwave-shell-set-bp-adjust (quote ,bp) (quote ,no-show))))
     ;; hide output?
     (idlwave-shell-hide-p 'breakpoint)
     'preempt t)))