emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/sweeprolog 8ac0e7afb9 065/166: ENHANCED: also complete pre


From: ELPA Syncer
Subject: [nongnu] elpa/sweeprolog 8ac0e7afb9 065/166: ENHANCED: also complete predicate names from xref
Date: Fri, 30 Sep 2022 04:59:26 -0400 (EDT)

branch: elpa/sweeprolog
commit 8ac0e7afb90c6f50b6849c0d92ff394c42b94c90
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>

    ENHANCED: also complete predicate names from xref
---
 sweep.el |  2 +-
 sweep.pl | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/sweep.el b/sweep.el
index b522dd1c1f..d081839c38 100644
--- a/sweep.el
+++ b/sweep.el
@@ -199,7 +199,7 @@
               (when (eq sts 'finished)
                 (let ((opoint (point)))
                   (save-match-data
-                    (with-silent-modifications
+                    (combine-after-change-calls
                       (skip-chars-backward "1234567890")
                       (when (= ?/ (preceding-char))
                         (backward-char)
diff --git a/sweep.pl b/sweep.pl
index c24bae8b60..a856240e57 100644
--- a/sweep.pl
+++ b/sweep.pl
@@ -210,8 +210,16 @@ sweep_local_predicate_completion([Mod|Sub], Preds) :-
     atom_string(M, Mod),
     findall(F/N,
             @(current_predicate(F/N), M),
-            Preds0),
-    convlist(sweep_predicate_completion_annotated(Sub, M), Preds0, Preds).
+            Preds0,
+            Tail),
+    findall(XF/XN,
+            (   xref_defined(SourceId, H, _),
+                H \= _:_,
+                pi_head(XF/XN, H)
+            ),
+            Tail),
+    list_to_set(Preds0, Preds1),
+    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]),



reply via email to

[Prev in Thread] Current Thread [Next in Thread]