Function: prolog-insert-predicate-template

prolog-insert-predicate-template is an interactive and byte-compiled function defined in prolog.el.gz.

Signature

(prolog-insert-predicate-template)

Documentation

Insert the template for the current clause.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/prolog.el.gz
(defun prolog-insert-predicate-template ()
  "Insert the template for the current clause."
  (interactive)
  (let* ((n 1)
         oldp
         (pinfo (prolog-clause-info))
         (predname (nth 0 pinfo))
         (arity (nth 1 pinfo)))
    (insert predname)
    (if (> arity 0)
        (progn
          (insert "(")
          (when prolog-electric-dot-full-predicate-template
            (setq oldp (point))
            (while (< n arity)
              (insert ",")
              (setq n (1+ n)))
            (insert ")")
            (goto-char oldp))
          ))
  ))