Function: TeX-uncomment

TeX-uncomment is an interactive and byte-compiled function defined in tex.el.

Signature

(TeX-uncomment)

Documentation

Delete comment characters from the beginning of each line in a comment.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-uncomment ()
  "Delete comment characters from the beginning of each line in a comment."
  (interactive)
  (save-excursion
    ;; Find first comment line
    (beginning-of-line)
    (while (and (looking-at (concat "^[ \t]*" TeX-comment-start-regexp))
                (not (bobp)))
      (forward-line -1))
    (let ((beg (point)))
      (forward-line 1)
      ;; Find last comment line
      (while (and (looking-at (concat "^[ \t]*" TeX-comment-start-regexp))
                  (not (eobp)))
        (forward-line 1))
      ;; Uncomment region
      (uncomment-region beg (point)))))