Function: cwarn-is-enabled

cwarn-is-enabled is a byte-compiled function defined in cwarn.el.gz.

Signature

(cwarn-is-enabled MODE &optional FEATURE)

Documentation

Non-nil if CWarn FEATURE is enabled for MODE.

FEATURE is an atom representing one construction to highlight.

Check if any feature is enabled for MODE if no feature is specified.

The valid features are described by the variable cwarn-font-lock-feature-keywords-alist.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cwarn.el.gz
;;}}}
;;{{{ Help functions

(defun cwarn-is-enabled (mode &optional feature)
  "Non-nil if CWarn FEATURE is enabled for MODE.
FEATURE is an atom representing one construction to highlight.

Check if any feature is enabled for MODE if no feature is specified.

The valid features are described by the variable
`cwarn-font-lock-feature-keywords-alist'."
  (let ((mode-configuration (assq mode cwarn-configuration)))
    (and mode-configuration
	 (or (null feature)
	     (let ((list-or-t (nth 1 mode-configuration)))
	       (or (eq list-or-t t)
		   (if (eq (car-safe list-or-t) 'not)
		       (not (memq feature (cdr list-or-t)))
		     (memq feature list-or-t))))))))