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)))

1 Answer 1


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.