Function: c-compose-keywords-list

c-compose-keywords-list is a byte-compiled function defined in cc-fonts.el.gz.

Signature

(c-compose-keywords-list BASE-LIST)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-fonts.el.gz
(defun c-compose-keywords-list (base-list)
  ;; Incorporate the font lock keyword lists according to
  ;; `c-doc-comment-style' on the given keyword list and return it.
  ;; This is used in the function bindings of the
  ;; `*-font-lock-keywords-*' symbols since we have to build the list
  ;; when font-lock is initialized.

  (unless (memq c-doc-face-name c-literal-faces)
    (setq c-literal-faces (cons c-doc-face-name c-literal-faces)))

  (let* ((doc-keywords (c-get-doc-comment-style))
	 (list (nconc (c--mapcan
		       (lambda (doc-style)
			 (let ((sym (intern
				     (concat (symbol-name doc-style)
					     "-font-lock-keywords"))))
			   (cond ((fboundp sym)
				  (funcall sym))
				 ((boundp sym)
				  (append (eval sym) nil)))))
		       (if (listp doc-keywords)
			   doc-keywords
			 (list doc-keywords)))
		      base-list)))

    ;; Kludge: If `c-font-lock-complex-decl-prepare' is on the list we
    ;; move it first since the doc comment font lockers might add
    ;; `c-type' text properties, so they have to be cleared before that.
    (when (memq 'c-font-lock-complex-decl-prepare list)
      (setq list (cons 'c-font-lock-complex-decl-prepare
		       (delq 'c-font-lock-complex-decl-prepare
			     (append list nil)))))

    list))