This question already has an answer here:

Is there a more compact way to make use of the rx macro in cases where we want to inline a list of strings from a variable? Such as

(defconst c++20-new-keywords-list


  "C++20 language extra keywords.")

  `((,(eval `(rx (group (|
                         "static_assert"      ;C++11
                         )))) . 'font-lock-keyword-face)))

marked as duplicate by Basil, Drew, Stefan, DoMiNeLa10 Aug 31 at 18:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Solution found in duplicate question How do I create a dynamic regexp with rx?.

Closing this for now.

Not the answer you're looking for? Browse other questions tagged or ask your own question.