Function: rst-bullet-list-region

rst-bullet-list-region is an interactive and byte-compiled function defined in rst.el.gz.

Signature

(rst-bullet-list-region BEG END ALL)

Documentation

Add bullets to all the leftmost paragraphs in the given region.

The region is specified between BEG and END. With ALL, do all lines instead of just paragraphs.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/rst.el.gz
;; FIXME: Does not deal with deeper indentation - although
;;        `rst-apply-indented-blocks' could.
(defun rst-bullet-list-region (beg end all)
  "Add bullets to all the leftmost paragraphs in the given region.
The region is specified between BEG and END.  With ALL,
do all lines instead of just paragraphs."
  (interactive "r\nP")
  (unless rst-preferred-bullets
    (error "No preferred bullets defined"))
  (let* ((bul (format "%c " (car rst-preferred-bullets)))
	 (indent (make-string (length bul) ? )))
    (rst-apply-indented-blocks
     beg end (rst-find-leftmost-column beg end)
     (lambda (count in-first in-sub in-super in-empty _relind)
       (cond
        (in-empty)
        (in-super)
        ((zerop count))
        (in-sub
         (insert indent))
        ((or in-first all)
         (insert bul))
        (t
         (insert indent)))
       nil))))