Function: kfill:hanging-list

kfill:hanging-list is a byte-compiled function defined in kfill.el.

Signature

(kfill:hanging-list PARAGRAPH)

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kfill.el
(defun kfill:hanging-list (paragraph)
  (let (prefix match beg end)
    (setq prefix (make-string (- (match-end 0) (match-beginning 0)) ?\ ))
    (when paragraph
      (setq match (buffer-substring (match-beginning 0) (match-end 0)))
      (if (string-match "^ +$" match)
	  (save-excursion
	    (while (and (not (bobp)) (looking-at prefix))
	      (kfill:forward-line -1))

	    (cond ((eval kfill:hanging-expression)
		   ;; Point is in front of a hanging list.
		   (setq beg (point)))
		  (t (setq beg (progn (kfill:forward-line 1) (point))))))
	(setq beg (point)))
      (save-excursion
	(kfill:forward-line)
	(while (and (looking-at prefix)
		    (not (equal (char-after (match-end 0)) ?\ )))
	  (kfill:forward-line))
	(setq end (point)))
      (narrow-to-region beg end))
    (setq fill-prefix prefix)))