|
(setq my/setup-functions-alist '((".clang-format" . yaml-mode)))
|
|
|
|
(defun my/file-setup ()
|
|
(when-let* ((filename (file-name-nondirectory (buffer-file-name)))
|
|
(f (map-elt my/setup-functions-alist filename)))
|
|
(funcall f)))
|
|
|
|
(add-hook 'find-file-hook #'my/file-setup)
|