Function: vhdl-comment-uncomment-region

vhdl-comment-uncomment-region is an interactive and byte-compiled function defined in vhdl-mode.el.gz.

Signature

(vhdl-comment-uncomment-region BEG END &optional ARG)

Documentation

Comment out region if not commented out, uncomment otherwise.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-comment-uncomment-region (beg end &optional _arg)
  "Comment out region if not commented out, uncomment otherwise."
  (interactive "r")
  (save-excursion
    (goto-char (1- end))
    (end-of-line)
    (setq end (point-marker))
    (goto-char beg)
    (beginning-of-line)
    (setq beg (point))
    (if (looking-at (concat "\\s-*" comment-start))
	(comment-region beg end '(4))
      (comment-region beg end))))