I am just starting to set up a perl environment in emacs but the problem is that I already program with prolog and both languages use the .pl
file extension. I have two directory ~/src/prolog
and ~/src/perl
where I store code for the respective languages. Currently I only have this line in my init:
(setq auto-mode-alist (append '(("\\.pl$" . prolog-mode))
auto-mode-alist))
How can I tell emacs that .pl
files in the ~/src/prolog
directory should use prolog-mode while the .pl
files in ~/src/perl
should use cperl-mode?