Function: prolog-clause-end

prolog-clause-end is a byte-compiled function defined in prolog.el.gz.

Signature

(prolog-clause-end &optional NOT-ALLOW-METHODS)

Documentation

Return the position at the end of the current clause.

If NOTALLOWMETHODS is non-nil then do not match on methods in objects (relevant only if prolog-system is set to sicstus).

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/prolog.el.gz
(defun prolog-clause-end (&optional not-allow-methods)
  "Return the position at the end of the current clause.
If NOTALLOWMETHODS is non-nil then do not match on methods in
objects (relevant only if `prolog-system' is set to `sicstus')."
  (save-excursion
    (beginning-of-line) ; Necessary since we use "^...." for the search.
    (if (re-search-forward
         (if (and (not not-allow-methods)
                  (eq prolog-system 'sicstus)
                  (prolog-in-object))
             (format
              "^\\(%s\\|%s\\|[^\n'\"%%]\\)*&[ \t]*\\(\\|%%.*\\)$\\|[ \t]*}"
              prolog-quoted-atom-regexp prolog-string-regexp)
           (format
            "^\\(%s\\|%s\\|[^\n'\"%%]\\)*\\.[ \t]*\\(\\|%%.*\\)$"
            prolog-quoted-atom-regexp prolog-string-regexp))
         nil t)
        (if (and (nth 8 (syntax-ppss))
                 (not (eobp)))
            (progn
              (forward-char)
              (prolog-clause-end))
          (point))
      (point))))