Function: c--mapcan

c--mapcan is a macro defined in cc-defs.el.gz.

Signature

(c--mapcan FUN LISZT)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-defs.el.gz
(defmacro c--mapcan (fun liszt)
  ;; CC Mode equivalent of `mapcan' which bridges the difference
  ;; between the host [X]Emacsen."
  ;; The motivation for this macro is to avoid the irritating message
  ;; "function `mapcan' from cl package called at runtime" produced by Emacs.
  (declare (debug t))
  (cond
   ((and (fboundp 'mapcan)
	 (subrp (symbol-function 'mapcan)))
    ;; XEmacs and Emacs >= 26.
    `(mapcan ,fun ,liszt))
   ;; The following was commented out on 2025-06-02.  cl-mapcan fails in an
   ;; obscure fashion in c-keywords-obarray.  See that c-lang-defvar for
   ;; details.
   ;; ((eq c--cl-library 'cl-lib)
   ;;  ;; Emacs >= 24.3, < 26.
   ;;  `(cl-mapcan ,fun ,liszt))
   (t
    ;; Emacs <= 24.2.  It would be nice to be able to distinguish between
    ;; compile-time and run-time use here.
    `(apply 'nconc (mapcar ,fun ,liszt)))))