branch: elpa/sweeprolog commit 2c99b60683640db3fbc2ec9944768105e84ca14b Author: Eshel Yaron <m...@eshelyaron.com> Commit: Eshel Yaron <m...@eshelyaron.com>
* (sweeprolog-identifier-at-point): fix module qualification --- sweep.pl | 8 ++++---- sweeprolog-tests.el | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sweep.pl b/sweep.pl index ec1be7af96..7645e55b1c 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 9bc0ad8286..59af86f546 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."