Function: vhdl-statement-p
vhdl-statement-p is a byte-compiled function defined in
vhdl-mode.el.gz.
Signature
(vhdl-statement-p &optional LIM)
Documentation
Return t if we are looking at a real "statement" keyword.
Assumes that the caller will make sure that we are looking at
vhdl-statement-fwd-re, and are not inside a literal, and that we are not
in the middle of an identifier that just happens to contain a
"statement" keyword.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-statement-p (&optional _lim)
"Return t if we are looking at a real \"statement\" keyword.
Assumes that the caller will make sure that we are looking at
vhdl-statement-fwd-re, and are not inside a literal, and that we are not
in the middle of an identifier that just happens to contain a
\"statement\" keyword."
(cond
;; "for" ... "generate":
((and (looking-at "f")
;; Make sure it's the start of a parameter specification.
(save-excursion
(forward-sexp 2)
(skip-chars-forward " \t\n\r\f")
(looking-at "in\\b[^_]"))
;; Make sure it's not an "end for".
(save-excursion
(backward-sexp)
(not (looking-at "end\\s-+\\w"))))
t)
;; "if" ... "then", "if" ... "generate", "if" ... "loop":
((and (looking-at "i")
;; Make sure it's not an "end if".
(save-excursion
(backward-sexp)
(not (looking-at "end\\s-+\\w"))))
t)
;; "while" ... "loop":
((looking-at "w")
t)
))