~sweeprolog-top-level-signal-current~ is available for signaling the
current top-level. It is bound by default to ~C-c C-c~. Normally, this
command signals the goal specified by the user option
-~sweeprolog-top-level-signal-default-goal~, which is set by default to
-~trace~, causing the top-level thread to enter trace mode (see [[https://www.swi-prolog.org/pldoc/man?section=trace-summary-trace-mode][Trace
-Mode in the SWI-Prolog manual]]). When called with a prefix argument
-(~C-u C-c C-c~), ~sweeprolog-top-level-signal-current~ instead prompts for
-a goal similarly to ~sweeprolog-top-level-signal~.
+~sweeprolog-top-level-signal-default-goal~, which is set by default to a
+predicate that interrupts the top-level thread returns control of the
+top-level to the user. When ~sweeprolog-top-level-signal-current~ is
+called with a prefix argument (~C-u C-c C-c~), it prompts for the goal.
It is also possible to signal top-levels from the =sweep= Top-level Menu
buffer with the command ~sweeprolog-top-level-menu-signal~ with point at
sweep_atom_collection/2,
sweep_context_callable/2,
sweep_predicate_completion_candidates/2,
- sweep_exportable_predicates/2
+ sweep_exportable_predicates/2,
+ sweep_interrupt/0
]).
:- use_module(library(pldoc)).
term_string(D1, D)
),
Preds).
+
+:- if(current_predicate(prolog_interrupt/0)).
+sweep_interrupt :- prolog_interrupt.
+:- else.
+sweep_interrupt :- trace.
+:- endif.
(function :tag "Custom Function"))
:group 'sweeprolog)
-(defcustom sweeprolog-top-level-signal-default-goal "trace"
+(defcustom sweeprolog-top-level-signal-default-goal "sweep_interrupt"
"Prolog goal used by default for signaling top-level threads."
- :package-version '((sweeprolog "0.8.10"))
+ :package-version '((sweeprolog "0.8.12"))
:type 'string
:group 'sweeprolog-top-level)