Function: idlwave-shell-set-bp-check

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

Signature

(idlwave-shell-set-bp-check BP)

Documentation

Check for failure to set breakpoint.

This is run on idlwave-shell-post-command-hook. Offers to recompile the procedure if we failed. This usually fixes the problem with not being able to set the breakpoint.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/idlw-shell.el.gz
(defun idlwave-shell-set-bp-check (bp)
  "Check for failure to set breakpoint.
This is run on `idlwave-shell-post-command-hook'.
Offers to recompile the procedure if we failed.  This usually fixes
the problem with not being able to set the breakpoint."
  ;; Scan for message
  (if idlwave-shell-command-output
      (cond
       ((string-match "% BREAKPOINT: *Unable to find code"
		      idlwave-shell-command-output)
	;; Offer to recompile
        (if (progn
              (beep)
              (y-or-n-p
               (concat "Okay to recompile file "
                       (idlwave-shell-bp-get bp 'file) "?")))
            ;; Recompile
            (progn
              ;; Clean up before retrying
              (idlwave-shell-command-failure)
              (idlwave-shell-send-command
               (concat ".run \"" (idlwave-shell-bp-get bp 'file) "\"") nil
	       (if (idlwave-shell-hide-p 'run) 'mostly) nil t)
              ;; Try setting breakpoint again
              (idlwave-shell-set-bp bp))
          (beep)
          (message "Unable to set breakpoint.")
          (idlwave-shell-command-failure))
	nil)

       ((string-match "% Syntax error" idlwave-shell-command-output)
	(message "Syntax error in condition.")
	(idlwave-shell-command-failure)
	nil)

       (t 'okay))))