]> git.eshelyaron.com Git - dict.git/commitdiff
* (sweeprolog-identifier-at-point): fix module qualification
authorEshel Yaron <me@eshelyaron.com>
Sat, 19 Nov 2022 19:20:24 +0000 (21:20 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 19 Nov 2022 19:20:24 +0000 (21:20 +0200)
sweep.pl
sweeprolog-tests.el

index ec1be7af96884f3212118067527152e81b092893..7645e55b1c9340ba19ce10ea0e991e4b31c66c4e 100644 (file)
--- a/sweep.pl
+++ b/sweep.pl
@@ -706,12 +706,12 @@ sweep_functor_arity_pi([F0,A], PI)   :-
     sweep_current_module(M0),
     (   @(predicate_property(M:Head, visible), M0),
         \+ @(predicate_property(M:Head, imported_from(_)), M0)
-    ->  true
+    ->  T = M:F/A
     ;   xref_defined(_, Head, imported(Other)), xref_module(Other, M)
-    ->  true
-    ;   M = M0
+    ->  T = M:F/A
+    ;   T = F/A
     ),
-    term_string(M:F/A, PI).
+    term_string(T, PI).
 sweep_functor_arity_pi([M,F0,A], PI) :-
     atom_string(F, F0), term_string(M:F/A, PI).
 
index 9bc0ad82865c1041b2b4cc0bfd1bd740a2d9a82b..59af86f546cf2d4ab01c7e1fd3371d0312d99d07 100644 (file)
@@ -313,7 +313,7 @@ foo(Bar).
     (goto-char (point-max))
     (backward-word)
     (should (equal (sweeprolog-identifier-at-point)
-                   "user:bar/1"))))
+                   "bar/1"))))
 
 (ert-deftest definition-at-point ()
   "Test recognizing predicate defintions."