Function: rst-find-leftmost-column

rst-find-leftmost-column is a byte-compiled function defined in rst.el.gz.

Signature

(rst-find-leftmost-column BEG END)

Documentation

Return the leftmost column spanned by region BEG to END.

The line containing the start of the region is always considered spanned. If the region ends at the beginning of a line this line is not considered spanned, otherwise it is spanned.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/rst.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Indentation

(defun rst-find-leftmost-column (beg end)
  "Return the leftmost column spanned by region BEG to END.
The line containing the start of the region is always considered
spanned.  If the region ends at the beginning of a line this line
is not considered spanned, otherwise it is spanned."
  (let (mincol)
    (save-match-data
      (save-excursion
	(goto-char beg)
	(1value
	 (rst-forward-line-strict 0))
	(while (< (point) end)
	  (unless (looking-at (rst-re 'lin-end))
	    (setq mincol (if mincol
			     (min mincol (current-indentation))
			   (current-indentation))))
	  (rst-forward-line-strict 1 end)))
      mincol)))