]> git.eshelyaron.com Git - sweep.git/commitdiff
FIXED: hide predicates starting with '$' in sweep-find-predicate
authorEshel Yaron <me@eshelyaron.com>
Sat, 3 Sep 2022 07:39:41 +0000 (10:39 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 3 Sep 2022 07:39:41 +0000 (10:39 +0300)
sweep.pl

index 68343bed66fb1aab1011bf697af26e39cefdbab6..d0461cf3d287311f4eb9840d883c405ef495b415 100644 (file)
--- a/sweep.pl
+++ b/sweep.pl
@@ -292,10 +292,13 @@ sweep_predicate_matches(Sub, [String|_]) :-
     sub_string(String, _, _, _, Sub).
 
 sweep_predicate_non_hidden([String|_]) :-
-    \+ sub_string(String, 0, _, _, "$").
+    \+ sub_string(String, _, _, _, ":'$").
 
 sweep_predicate_description(M:F/N, [S|T]) :-
-    sweep_predicate_description_(M, F, N, T), format(string(S), '~w:~w/~w', [M, F, N]).
+    sweep_predicate_description_(M, F, N, T),
+    format(string(S),
+           '~w:~W/~w',
+           [M, F, [quoted(true), character_escapes(true)], N]).
 
 sweep_predicate_description_(M, F, N, [D]) :-
     doc_comment(M:F/N, _, D0, _), !, atom_string(D0, D).