TGViewer
/r/emacs /r/emacs @r_emacs · 81 subscribers
Post #28731 9
Can the :mode command take multiple extensions to trigger a mode?

Take this set of extensions to trigger yaml-mode

:mode ("\\.yml\\'" . yaml-mode)
:mode ("\\.yaml\\'" . yaml-mode)

Is something like this possible

:mode ('("\\.yml\\'" "\\.yml\\'") . yaml-mode)

i.e pass a list of extensions, rather than a single extension?

Would that require some kind of macro?

https://redd.it/1x4vdjm
@r_emacs
Reddit From the emacs community on Reddit Explore this post and more from the emacs community
More from @r_emacs
  1. Oct 13, 2026consult questions and tips (custom file picker, counsel-org-goto-all) Disclaimer: not a pr…
  2. Oct 13, 2026photo post
  3. Oct 13, 2026agent-shell 0.87 updates https://redd.it/1x4t0hl @r_emacs
  4. Oct 13, 2026Rome Wasn't Built In A Day, More Like 10 Minutes https://www.youtube.com/watch?v=BuqZb6Avd…
  5. Oct 13, 2026How can you design your init.el and use-package clauses so that features which are UI base…
  6. Oct 13, 2026My org-attach config, only place files go (paste / drag / download), with names I can actu…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →