From 9480662b19d045e6243400c6df6c54728ff9fb19 Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Tue, 18 May 2010 23:05:02 +0100 Subject: Associate files using interpreter "escript" with Erlang mode A file whose first line contains "#!/usr/bin/env escript" should be opened in erlang-mode, even if its name doesn't end in ".erl". Add an entry to interpreter-mode-alist to that effect. --- lib/tools/emacs/erlang-start.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/tools') diff --git a/lib/tools/emacs/erlang-start.el b/lib/tools/emacs/erlang-start.el index 542e81f24c..bbcea3e46a 100644 --- a/lib/tools/emacs/erlang-start.el +++ b/lib/tools/emacs/erlang-start.el @@ -90,6 +90,11 @@ (or (assoc (car b) auto-mode-alist) (setq auto-mode-alist (cons b auto-mode-alist)))) +;; +;; Associate files using interpreter "escript" with Erlang mode. +;; + +(add-to-list 'interpreter-mode-alist (cons "escript" 'erlang-mode)) ;; ;; Ignore files ending in ".jam", ".vee", and ".beam" when performing -- cgit v1.2.3