Function: prolog-beginning-of-predicate
prolog-beginning-of-predicate is an interactive and byte-compiled
function defined in prolog.el.gz.
Signature
(prolog-beginning-of-predicate)
Documentation
Go to the nearest beginning of predicate before current point.
Return the final point or nil if no such a beginning was found.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/prolog.el.gz
;; (defun prolog-next-clause ()
;; "Move to the beginning of the next clause."
;; (interactive)
;; (prolog-end-of-clause)
;; (forward-char)
;; (prolog-end-of-clause)
;; (prolog-beginning-of-clause))
(defun prolog-beginning-of-predicate ()
"Go to the nearest beginning of predicate before current point.
Return the final point or nil if no such a beginning was found."
;; FIXME: Hook into beginning-of-defun.
(interactive)
(let ((op (point))
(pos (prolog-pred-start)))
(if pos
(if (= op pos)
(if (not (bobp))
(progn
(goto-char pos)
(backward-char 1)
(setq pos (prolog-pred-start))
(if pos
(progn
(goto-char pos)
(point)))))
(goto-char pos)
(point)))))