unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Specifying a file in auto-mode-alist
@ 2021-04-23 20:25 Patrick Mahan
  2021-04-23 20:42 ` Óscar Fuentes
  0 siblings, 1 reply; 6+ messages in thread
From: Patrick Mahan @ 2021-04-23 20:25 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-23 22:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-23 20:25 Specifying a file in auto-mode-alist Patrick Mahan
2021-04-23 20:42 ` Óscar Fuentes
2021-04-23 21:42   ` Stefan Monnier
2021-04-23 22:14     ` Patrick Mahan
2021-04-23 22:09   ` Patrick Mahan
2021-04-23 22:23     ` Stefan Monnier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).