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).
(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."