help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Prolog TAGS -- how to detect facts as well as clauses.


From: Tim Morley (remove vegetable for email address)
Subject: Prolog TAGS -- how to detect facts as well as clauses.
Date: Fri, 17 Jan 2003 15:21:07 +0100

I use M-. a lot while writing Prolog in Emacs to find definitions of
predicates. What I would like, though, is also to be able to find *facts*,
preferably using the same keyboard shortcut.

Illustration: say I have the following predicate:
   foo(X, Z) :-
      first(X, Y),
      second(Y, Z).

I want to find out what first/2 does, so I do a M-. first RET and it takes
me to the definition of first, whatever file it's in within the project:
first(X,Y) :-
   (X>2 -> Y=true ; Y=false).

However, if first/2 is just a fact, or a series of facts:
first(1, false).
first(2, false).
first(3, true).
first(4, true).

then M-. doesn't find it.

Is there a parameter I can change in etags to be able to find facts from the
TAGS table?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]