[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 99f0ce4e53 3/4: FIXED: handling of operators as
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 99f0ce4e53 3/4: FIXED: handling of operators as predicate completion candidates |
Date: |
Fri, 21 Oct 2022 05:59:24 -0400 (EDT) |
branch: elpa/sweeprolog
commit 99f0ce4e531b5a9d7d82f0d091939b93a563fe8e
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
FIXED: handling of operators as predicate completion candidates
---
sweep.pl | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/sweep.pl b/sweep.pl
index cf29c39065..1fcdf02e40 100644
--- a/sweep.pl
+++ b/sweep.pl
@@ -583,9 +583,9 @@ sweep_local_predicate_completion([Mod|Sub], Preds) :-
convlist(sweep_predicate_completion_annotated(Sub, M), Preds1, Preds).
sweep_predicate_completion_annotated(Sub, M, F/N, [S|A]) :-
- format(string(S), '~W/~w', [F, [quoted(true), character_escapes(true)],
N]),
+ format(string(S), '~W', [F/N, [quoted(true), character_escapes(true)]]),
sub_string(S, _, _, _, Sub),
- \+ sub_string(S, _, _, _, "$"),
+ \+ sub_string(S, 0, _, _, "'$"),
pi_head(F/N, Head),
findall(P, @(predicate_property(Head, P), M), Ps0),
sweep_predicate_completion_op_annotation(F, Ps0, Ps),
@@ -620,7 +620,10 @@ sweep_predicates_collection(Sub, Preds) :-
findall(M:F/N,
( current_predicate(M:F/N),
pi_head(F/N, H),
- \+ (predicate_property(M:H, imported_from(M1)), M \= M1)
+ ( M == system
+ -> true
+ ; \+ (predicate_property(M:H, imported_from(M1)), M \= M1)
+ )
),
Preds0,
Tail0),
@@ -661,13 +664,13 @@ sweep_predicate_matches(Sub, [String|_]) :-
sub_string(String, _, _, _, Sub).
sweep_predicate_non_hidden([String|_]) :-
- \+ sub_string(String, _, _, _, "$").
+ \+ 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, [quoted(true), character_escapes(true)], N]).
+ '~W',
+ [M:F/N, [quoted(true), character_escapes(true)]]).
sweep_predicate_description_(M, F, N, [D]) :-
doc_comment(M:F/N, _, D0, _), !, atom_string(D0, D).