Function: idlwave-shell-filter-bp
idlwave-shell-filter-bp is a byte-compiled function defined in
idlw-shell.el.gz.
Signature
(idlwave-shell-filter-bp &optional NO-SHOW)
Documentation
Get the breakpoints from idlwave-shell-command-output.
Create idlwave-shell-bp-alist updating breakpoint count and command
data from previous breakpoint list. If NO-SHOW is set, don't update
the breakpoint overlays.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/idlw-shell.el.gz
(defun idlwave-shell-filter-bp (&optional no-show)
"Get the breakpoints from `idlwave-shell-command-output'.
Create `idlwave-shell-bp-alist' updating breakpoint count and command
data from previous breakpoint list. If NO-SHOW is set, don't update
the breakpoint overlays."
(with-current-buffer (get-buffer-create idlwave-shell-bp-buffer)
(erase-buffer)
(insert idlwave-shell-command-output)
(goto-char (point-min))
(let ((old-bp-alist idlwave-shell-bp-alist)
;; Searching the breakpoints
;; In IDL 5.5, the breakpoint reporting format changed.
(bp-re54 "^[ \t]*\\([0-9]+\\)[ \t]+\\(\\S-+\\)?[ \t]+\\([0-9]+\\)[ \t]+\\(\\S-+\\)")
(bp-re55
(concat
"^\\s-*\\([0-9]+\\)" ; 1 index
"\\s-+\\([0-9]+\\)" ; 2 line number
"\\s-+\\(Uncompiled\\|" ; 3-6 either uncompiled or routine name
"\\(\\(Func=\\|Pro=\\)\\(\\$?[a-zA-Z][a-zA-Z0-9$_:]*\\$?\\)\\)\\)"
"\\(\\s-*,\\s-*After=[0-9]+/\\([0-9]+\\)?\\)?" ; 7-8 After part
"\\(\\s-*,\\s-*\\(BreakOnce\\)\\)?" ; 9-10 BreakOnce
"\\(\\s-*,\\s-*\\(Condition='\\(.*\\)'\\)\n?\\)?" ; 11-13 Condition
"\\(\\s-*,\\s-*\\(Disabled\\)\n?\\)?" ; 14-15 Disabled
"\\s-+\\(\\S-+\\)")) ; 16 File name
file line index module
count condition disabled
bp-re indmap)
(setq idlwave-shell-bp-alist (list nil))
;; Search for either header type, and set the correct regexp
(when (or
(if (re-search-forward "^\\s-*Index.*\n\\s-*-" nil t)
(setq bp-re bp-re54 ; versions <= 5.4
indmap '(1 2 3 4))) ;index module line file
(if (re-search-forward
"^\\s-*Index\\s-*Line\\s-*Attributes\\s-*File" nil t)
(setq bp-re bp-re55 ; versions >= 5.5
indmap '(1 6 2 16)))) ; index module line file
;; There seems to be a breakpoint listing here, parse breakpoint lines.
(while (re-search-forward bp-re nil t)
(setq index (string-to-number (match-string (nth 0 indmap)))
module (match-string (nth 1 indmap))
line (string-to-number (match-string (nth 2 indmap)))
file (idlwave-shell-file-name (match-string (nth 3 indmap))))
(if (eq bp-re bp-re55)
(setq count (if (match-string 10) 1
(if (match-string 8)
(string-to-number (match-string 8))))
condition (match-string 13)
disabled (not (null (match-string 15)))))
;; Add the breakpoint info to the list
(nconc idlwave-shell-bp-alist
(list (cons (list file line)
(list
(list index module)
;; bp data: count, command, condition, disabled
count nil condition disabled))))))
(setq idlwave-shell-bp-alist (cdr idlwave-shell-bp-alist))
;; Update breakpoint data
(mapc (if (eq bp-re bp-re54)
#'idlwave-shell-update-bp
#'idlwave-shell-update-bp-command-only)
old-bp-alist)))
;; Update the breakpoint overlays
(unless no-show (idlwave-shell-update-bp-overlays))
;; Return the new list
idlwave-shell-bp-alist)