From: Eshel Yaron Date: Sat, 19 Nov 2022 19:20:24 +0000 (+0200) Subject: * (sweeprolog-identifier-at-point): fix module qualification X-Git-Tag: V8.5.20-sweep-0.8.9~6 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2c99b60683640db3fbc2ec9944768105e84ca14b;p=dict.git * (sweeprolog-identifier-at-point): fix module qualification --- diff --git a/sweep.pl b/sweep.pl index ec1be7a..7645e55 100644 --- 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). diff --git a/sweeprolog-tests.el b/sweeprolog-tests.el index 9bc0ad8..59af86f 100644 --- a/sweeprolog-tests.el +++ b/sweeprolog-tests.el @@ -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."