Function: bytecomp--cus-warn

bytecomp--cus-warn is a byte-compiled function defined in bytecomp.el.gz.

Signature

(bytecomp--cus-warn FORM FORMAT &rest ARGS)

Documentation

Emit a warning about a defcustom type.

FORM is used to provide location, bytecomp--cus-function and bytecomp--cus-name for context.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/bytecomp.el.gz
(defun bytecomp--cus-warn (form format &rest args)
  "Emit a warning about a `defcustom' type.
FORM is used to provide location, `bytecomp--cus-function' and
`bytecomp--cus-name' for context."
  (let* ((actual-fun (or (cdr (assq bytecomp--cus-function
                                    '((custom-declare-group    . defgroup)
                                      (custom-declare-face     . defface)
                                      (custom-declare-variable . defcustom))))
                         bytecomp--cus-function))
         (prefix (format "in %s%s: "
                         actual-fun
                         (if bytecomp--cus-name
                             (format " for `%s'" bytecomp--cus-name)
                           ""))))
    (apply #'byte-compile-warn-x form (concat prefix format) args)))