~C-c C-s~ in ~sweeprolog-mode~ buffers, prompts for a Prolog term to
search for and finds terms in the current buffer that the search term
subsumes. For example, to find if-then-else constructs in the current
-buffer do ~C-c C-s _ ; _ -> _ RET~.
+buffer do ~C-c C-s _ -> _ ; _ RET~.
#+FINDEX: sweeprolog-term-search-repeat-forward
#+FINDEX: sweeprolog-term-search-repeat-backward
sweep_match_term(quasi_quotation_position(_, _, SyntaxTerm, SyntaxPos, _), _, Term, From, To) :-
sweep_match_term(SyntaxPos, SyntaxTerm, Term, From, To).
-list_tail([_|T0], T) :- T0 = [_|_], !, list_tail(T0, T).
+list_tail([_|T0], T) :- nonvar(T0), T0 = [_|_], !, list_tail(T0, T).
list_tail([_|T], T).