Function: c-at-macro-vsemi-p
c-at-macro-vsemi-p is a byte-compiled function defined in
cc-engine.el.gz.
Signature
(c-at-macro-vsemi-p &optional POS)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
(defun c-at-macro-vsemi-p (&optional pos)
;; Is there a "virtual semicolon" at POS or point?
;; (See cc-defs.el for full details of "virtual semicolons".)
;;
;; This is true when point is at the last non syntactic WS position on the
;; line, there is a macro call last on the line, and this particular macro's
;; name is defined by the regexp `c-macro-with-semi-re' as not needing a
;; semicolon.
(save-excursion
(save-restriction
(widen)
(if pos
(goto-char pos)
(setq pos (point)))
(and
c-macro-with-semi-re
(eq (skip-chars-backward " \t") 0)
;; Check we've got nothing after this except comments and empty lines
;; joined by escaped EOLs.
(skip-chars-forward " \t") ; always returns non-nil.
(progn
(while ; go over 1 block comment per iteration.
(and
(looking-at "\\(\\\\[\n\r][ \t]*\\)*")
(goto-char (match-end 0))
(cond
((looking-at c-block-comment-start-regexp)
(and (forward-comment 1)
(skip-chars-forward " \t"))) ; always returns non-nil
((looking-at c-line-comment-start-regexp)
(end-of-line)
nil)
(t nil))))
(eolp))
(goto-char pos)
(progn (c-backward-syntactic-ws)
(eq (point) pos))
;; Check for one of the listed macros being before point.
(or (not (eq (char-before) ?\)))
(when (c-go-list-backward)
(c-backward-syntactic-ws)
t))
(c-simple-skip-symbol-backward)
(looking-at c-macro-with-semi-re)
(goto-char pos)
(not (c-in-literal)))))) ; The most expensive check last.