7.8 Predicate Definition Boundaries

The following commands act on entire Prolog predicate definitions as a single unit:

M-n

Move forward from point to the next predicate definition in the current buffer (sweeprolog-forward-predicate).

M-p

Move backward from point to the previous predicate definition (sweeprolog-backward-predicate).

M-h

Select the current predicate as the active region, put point at the its beginning, and the mark at the end (sweeprolog-mark-predicate).

In Sweep Prolog mode, the commands M-n (sweeprolog-forward-predicate) and M-p (sweeprolog-backward-predicate) are available for quickly jumping to the first line of the next or previous predicate definition in the current buffer.

The command M-h (sweeprolog-mark-predicate) marks the entire predicate definition at point, along with its ‘PlDoc’ comments if there are any. As an example, you can use this command to move an entire predicate definition typing M-h C-w and then yanking it elsewhere with C-y.