0

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
  (list
   "char8_t"
   "import"
   "module"
   "concept"
   "consteval"
   "requires"

   "co_yield"
   "co_await"
   "co_return"

   "synchronized"
   "atomic_cancel"
   "atomic_commit"
   "atomic_noexcept"
   )
  "C++20 language extra keywords.")

 (font-lock-add-keywords
  'c++-mode
  `((,(eval `(rx (group (|
                         "static_assert"      ;C++11
                         ,@c++20-new-keywords-list
                         )))) . '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.

0

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.