Function: js--make-framework-matcher

js--make-framework-matcher is a byte-compiled function defined in js.el.gz.

Signature

(js--make-framework-matcher FRAMEWORK &rest REGEXPS)

Documentation

Helper function for building js--font-lock-keywords.

Create a byte-compiled function for matching a concatenation of REGEXPS, but only if FRAMEWORK is in js-enabled-frameworks.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/js.el.gz
;;; Font Lock
(defun js--make-framework-matcher (framework &rest regexps)
  "Helper function for building `js--font-lock-keywords'.
Create a byte-compiled function for matching a concatenation of
REGEXPS, but only if FRAMEWORK is in `js-enabled-frameworks'."
  (let ((regexp (apply #'concat regexps)))
    (lambda (limit)
      (when (memq framework js-enabled-frameworks)
        (re-search-forward regexp limit t)))))