Created
December 4, 2023 16:48
-
-
Save razzius/088beecff832961a7975a26d6425a11e to your computer and use it in GitHub Desktop.
razzi-associate-extension-mode.el
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun razzi-associate-extension-mode (extension mode) | |
"Associate a file extension with an editing mode. | |
For example, (razzi-associate-extension-mode \"js\" 'javascript-mode)" | |
(let ((pattern (concat "\\." extension "$"))) | |
(add-to-list 'auto-mode-alist (cons pattern mode)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment