local-variable-p

local-variable-p is a built-in function in `C source code'.

(local-variable-p VARIABLE &optional BUFFER)

Non-nil if VARIABLE has a local binding in buffer BUFFER.
BUFFER defaults to the current buffer.