aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools
diff options
context:
space:
mode:
authorMagnus Henoch <[email protected]>2010-05-18 23:05:02 +0100
committerMagnus Henoch <[email protected]>2010-05-18 23:05:02 +0100
commit9480662b19d045e6243400c6df6c54728ff9fb19 (patch)
treee1b49e6fc6e1620e617b12c75833716520ff43d4 /lib/tools
parent5fe8d47a60c89f1235f9fc727e650ada491246a3 (diff)
downloadotp-9480662b19d045e6243400c6df6c54728ff9fb19.tar.gz
otp-9480662b19d045e6243400c6df6c54728ff9fb19.tar.bz2
otp-9480662b19d045e6243400c6df6c54728ff9fb19.zip
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.
Diffstat (limited to 'lib/tools')
-rw-r--r--lib/tools/emacs/erlang-start.el5
1 files changed, 5 insertions, 0 deletions
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