Function: vhdl-comment-indent
vhdl-comment-indent is a byte-compiled function defined in
vhdl-mode.el.gz.
Signature
(vhdl-comment-indent)
Documentation
Indent comments.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Comment templates and functions
(defun vhdl-comment-indent ()
"Indent comments."
(let* ((position (point))
(col
(progn
(forward-line -1)
(if (re-search-forward "--" position t)
(- (current-column) 2) ; existing comment at bol stays there
(goto-char position)
(skip-chars-backward " \t")
(max comment-column ; else indent to comment column
(1+ (current-column))))))) ; except leave at least one space
(goto-char position)
col))