11; ; ess-tracebug.el --- Tracing and debugging facilities for ESS. -*- lexical-binding : t ; -*-
22
3- ; ; Copyright (C) 2011-2022 Free Software Foundation, Inc.
3+ ; ; Copyright (C) 2011-2025 Free Software Foundation, Inc.
44; ; Author: Vitalie Spinu
55; ; Maintainer: Vitalie Spinu
66; ; Created: Oct 14 14:15:22 2010
@@ -588,7 +588,7 @@ ESS internal code assumes default R prompts.")
588588 (setq-local compilation-error-regexp-alist ess-error-regexp-alist)
589589 (let (compilation-mode-font-lock-keywords )
590590 (compilation-setup t ))
591- (setq next-error-function 'ess-tracebug-next-error-function )
591+ (setq next-error-function # 'ess-tracebug-next-error-function )
592592 ; ; new locals
593593 (make-local-variable 'ess--tb-last-input )
594594 (make-local-variable 'ess--tb-last-input-overlay )
@@ -1231,10 +1231,10 @@ value from EXPR and then sent to the subprocess."
12311231
12321232(defun ess-mpi-handle-messages (buf )
12331233 " Handle all mpi messages in BUF and delete them.
1234- The MPI message has the form TYPEFIELD ... where TYPE is the
1234+ The MPI message has the form \\ ^[TYPE \\ ^^FIELD ...\\ ^] where TYPE is the
12351235type of the messages on which handlers in `ess-mpi-handlers' are
1236- dispatched. And FIELDs are strings. Return :incomplete if BUF
1237- ends with an incomplete message."
1236+ dispatched, \\ ^C are ASCII control chars, and FIELDs are strings.
1237+ Return `:incomplete' if BUF ends with an incomplete message."
12381238 (let ((obuf (current-buffer ))
12391239 (out nil ))
12401240 (with-current-buffer buf
@@ -1992,6 +1992,9 @@ Each sublist has five elements:
19921992 doesn't apply to current context."
19931993 :group 'ess-debug
19941994 :type '(alist :key-type symbol
1995+ ; ; FIXME: What's this `group' ? The values looks like strings!
1996+ ; ; FIXME: The docstring talks about a 6th element (function)
1997+ ; ; but it's missing here.
19951998 :value-type (group string string symbol face)))
19961999
19972000(defcustom ess-bp-inactive-spec
@@ -2001,7 +2004,8 @@ Each sublist has five elements:
20012004 ; ; `ess-bp-type-spec-alist' except that the second element giving
20022005 ; ; the R expression is meaningless here." ;;fixme: second element is missing make it nil for consistency with all other specs
20032006 :group 'ess-debug
2004- :type 'list )
2007+ :type '(alist :key-type symbol
2008+ :value-type (group string string symbol face)))
20052009
20062010(defcustom ess-bp-conditional-spec
20072011 '(conditional " browser(expr={%s})" " CB[ %s ]>\n " question-mark ess-bp-fringe-browser-face)
@@ -2011,14 +2015,16 @@ List format is identical to that of the elements of
20112015expression to be replaced instead of %s in the second and third
20122016elements of the specifications."
20132017 :group 'ess-debug
2014- :type 'list )
2018+ :type '(alist :key-type symbol
2019+ :value-type (group string string symbol face)))
20152020
20162021(defcustom ess-bp-logger-spec
20172022 '(logger " .ess_log_eval('%s')" " L[ \" %s\" ]>\n " hollow-square ess-bp-fringe-logger-face)
20182023 " List giving the loggers specifications.
20192024List format is identical to that of `ess-bp-type-spec-alist' ."
20202025 :group 'ess-debug
2021- :type 'list )
2026+ :type '(alist :key-type symbol
2027+ :value-type (group string string symbol face)))
20222028
20232029
20242030(defun ess-bp-get-bp-specs (type &optional condition no-error )
@@ -2339,7 +2345,7 @@ If there is no active R session, this command triggers an error."
23392345(defun ess-bp-next nil
23402346 " Goto next breakpoint."
23412347 (interactive )
2342- (when-let ((bp-pos (next-single-property-change (point ) 'ess-bp )))
2348+ (when-let* ((bp-pos (next-single-property-change (point ) 'ess-bp )))
23432349 (save-excursion
23442350 (goto-char bp-pos)
23452351 (when (get-text-property (1- (point )) 'ess-bp )
@@ -2352,7 +2358,7 @@ If there is no active R session, this command triggers an error."
23522358(defun ess-bp-previous nil
23532359 " Goto previous breakpoint."
23542360 (interactive )
2355- (if-let ((bp-pos (previous-single-property-change (point ) 'ess-bp )))
2361+ (if-let* ((bp-pos (previous-single-property-change (point ) 'ess-bp )))
23562362 (goto-char (or (previous-single-property-change bp-pos 'ess-bp )
23572363 bp-pos))
23582364 (message " No breakpoints before the point found " )))
@@ -2820,7 +2826,10 @@ for signature and trace it with browser tracer."
28202826 " *ALL*" ))
28212827 (setq fun (ess-completing-read " Undebug" debugged nil t nil nil def-val))
28222828 (if (equal fun " *ALL*" )
2823- (ess-command (concat " .ess_dbg_UndebugALL(c(\" " (mapconcat 'identity debugged " \" , \" " ) " \" ))\n " ) tbuffer)
2829+ (ess-command (concat " .ess_dbg_UndebugALL(c(\" "
2830+ (mapconcat #'identity debugged " \" , \" " )
2831+ " \" ))\n " )
2832+ tbuffer)
28242833 (ess-command (format " .ess_dbg_UntraceOrUndebug(\" %s \" )\n " fun) tbuffer))
28252834 (with-current-buffer tbuffer
28262835 (if (= (point-max ) 1 ) ; ; not reliable TODO:
0 commit comments