Function: c-valid-offset
c-valid-offset is a byte-compiled function defined in cc-vars.el.gz.
Signature
(c-valid-offset OFFSET)
Documentation
Return non-nil if OFFSET is a valid offset for a syntactic symbol.
See c-offsets-alist.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/cc-vars.el.gz
(defun c-valid-offset (offset)
"Return non-nil if OFFSET is a valid offset for a syntactic symbol.
See `c-offsets-alist'."
(or (eq offset '+)
(eq offset '-)
(eq offset '++)
(eq offset '--)
(eq offset '*)
(eq offset '/)
(integerp offset)
(functionp offset)
(and (symbolp offset) (boundp offset))
(and (vectorp offset)
(= (length offset) 1)
(integerp (elt offset 0)))
(and (consp offset)
(not (eq (car offset) 'quote)) ; Detect misquoted lists.
(progn
(when (memq (car offset) '(first min max add))
(setq offset (cdr offset)))
(while (and (consp offset)
(c-valid-offset (car offset)))
(setq offset (cdr offset)))
(null offset)))))