[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Specifying a file in auto-mode-alist
From: |
Patrick Mahan |
Subject: |
Specifying a file in auto-mode-alist |
Date: |
Fri, 23 Apr 2021 13:25:30 -0700 |
All,
I have build scripts that capture a build (makefile output) into files
called build*.log or Build*.log. These files may occur at various points in
the directory tree.
However if I use the following:
(add-to-list 'auto-mode-alist (quote("build*\\.log'" . compilation-mode)))
When I edit a file say 'build.log' it does not enable compilation mode.
I tried -
(add-to-list 'auto-mode-alist (quote("build*\\'" . compilation-mode)))
But that clashes with other files like a0build.h.
I've read the wiki page on auto-mode-alist, but none of the examples are
about how to use filename that starts with 'xyz*.log'.
Thanks,
Patrick
- Specifying a file in auto-mode-alist,
Patrick Mahan <=