Function: vhdl-in-comment-p
vhdl-in-comment-p is a byte-compiled function defined in
vhdl-mode.el.gz.
Signature
(vhdl-in-comment-p &optional POS)
Documentation
Check if point is in a comment (include multi-line comments).
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
;; Syntactic support functions:
(defun vhdl-in-comment-p (&optional pos)
"Check if point is in a comment (include multi-line comments)."
(let ((parse (lambda (p)
(let ((c (char-after p)))
(or (and c (eq (char-syntax c) ?<))
(nth 4 (parse-partial-sexp
(save-excursion
(beginning-of-defun)
(point)) p)))))))
(save-excursion
(goto-char (or pos (point)))
(or (funcall parse (point))
;; `parse-partial-sexp's notion of comments doesn't span lines
(progn
(back-to-indentation)
(unless (eolp)
(forward-char)
(funcall parse (point))))))))