Wednesday, January 2, 2008

To install javascript-mode.el on emacs

C-h v load-path will give path were U need to put the javascript-mode.el file

Include this in the .emacs file
(if there is no .emacs file make one in the home directory)

;; for javascript files
(autoload 'javascript-mode "javascript-mode" "JavaScript mode" t)
(setq auto-mode-alist (append '(("\\.js$" . javascript-mode))
auto-mode-alist))


This should work....

Its explained in more detailed way at
http://www.divmod.org/trac/attachment/wiki/DivmodNevow/Athena/Emacs/Files/javascript-mode.el

No comments:

Post a Comment