This piece #elisp of makes #emacs execute certain code when opening a file with a particular name. This is useful for files that have no clear extension or mode setting.
I use it to enter yaml-mode
whenever I open a .clang-format file (which I don’t want to pollute with -*- magic).
The original code was inspired by this StackExchange post, but I found the implementation quite cumbersome so I rewrote it to make it more condense.