Function: rst-comment-region

rst-comment-region is a byte-compiled function defined in rst.el.gz.

Signature

(rst-comment-region BEG END &optional ARG)

Documentation

Comment or uncomment the current region.

Region is from BEG to END. Uncomment if ARG.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/rst.el.gz
(defun rst-comment-region (beg end &optional arg)
  "Comment or uncomment the current region.
Region is from BEG to END.  Uncomment if ARG."
  (save-excursion
    (if (consp arg)
	(rst-uncomment-region beg end arg)
      (goto-char beg)
      (rst-forward-line-strict 0)
      (let ((ind (current-indentation))
	    (bol (point)))
	(indent-rigidly bol end rst-indent-comment)
	(goto-char bol)
	(open-line 1)
	(indent-line-to ind)
	(insert (comment-string-strip comment-start t t))))))