Function: f90-comment-region

f90-comment-region is an interactive and byte-compiled function defined in f90.el.gz.

Signature

(f90-comment-region BEG-REGION END-REGION)

Documentation

Comment/uncomment every line in the region.

Insert the variable f90-comment-region(var)/f90-comment-region(fun) at the start of every line in the region, or, if already present, remove it.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/f90.el.gz
(defun f90-comment-region (beg-region end-region)
  "Comment/uncomment every line in the region.
Insert the variable `f90-comment-region' at the start of every line
in the region, or, if already present, remove it."
  (interactive "*r")
  (let ((end (copy-marker end-region)))
    (goto-char beg-region)
    (beginning-of-line)
    (if (looking-at (regexp-quote f90-comment-region))
        (delete-region (point) (match-end 0))
      (insert f90-comment-region))
    (while (and (zerop (forward-line 1))
                (< (point) end))
      (if (looking-at (regexp-quote f90-comment-region))
          (delete-region (point) (match-end 0))
        (insert f90-comment-region)))
    (set-marker end nil)))