Function: prolog-fill-paragraph
prolog-fill-paragraph is an interactive and byte-compiled function
defined in prolog.el.gz.
Signature
(prolog-fill-paragraph)
Documentation
Fill paragraph comment at or after point.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/prolog.el.gz
(defun prolog-fill-paragraph ()
"Fill paragraph comment at or after point."
(interactive)
(let* ((bounds (prolog-comment-limits))
(type (nth 2 bounds)))
(if (eq type 'line)
(let ((fill-prefix (prolog-guess-fill-prefix)))
(fill-paragraph nil))
(save-excursion
(save-restriction
;; exclude surrounding lines that delimit a multiline comment
;; and don't contain alphabetic characters, like "/*******",
;; "- - - */" etc.
(save-excursion
(backward-paragraph)
(unless (bobp) (forward-line))
(if (string-match "^/\\*[^a-zA-Z]*$" (thing-at-point 'line))
(narrow-to-region (line-end-position) (point-max))))
(save-excursion
(forward-paragraph)
(forward-line -1)
(if (string-match "^[^a-zA-Z]*\\*/$" (thing-at-point 'line))
(narrow-to-region (point-min) (line-beginning-position))))
(let ((fill-prefix (prolog-guess-fill-prefix)))
(fill-paragraph nil))))
)))