Trouble loading a js-html-mode.el
Alright, I'm a complete Emacs Newb (admitting it now). I want to use a js mode (Steve Yegge's) but I don't know the command for loading the file and then have it used when I do a find-file for a .js file.
Please help -- it sucks being an Emacs Newb.
L-
"Education is when you read the fine print; experience is what you get when you don't." -Pete Seegerwww.lucid-edge.net
I'm not familiar with the specific mode you mention, but usually, when you install an emacs mode, it adds a hook to the file opening procedure that detects a ".js" extension and automatically loads the mode.
Manually, you'd be adding a line like this to your .emacs file:
(setq auto-mode-alist
(cons '("\\.js$" . js-mode) auto-mode-alist))
Manually, you'd be adding a line like this to your .emacs file:
(setq auto-mode-alist
(cons '("\\.js$" . js-mode) auto-mode-alist))
Right I got this to work.
What I did was compile the Lisp code and put the resulting .elc in the /lisp dir.
Then I added the following lines to my .emacs file:
(global-font-lock-mode t)
(load-library "js2-20080616a.elc")
(autoload 'js2-mode "js2-20080616a" "javascript 1.7" t)<br>(setq auto-mode-alist (cons '("\\.js$" . js2-mode) auto-mode-alist))<br><br>This seemed to do the trick.<br><br>Thanks,<br>L-
What I did was compile the Lisp code and put the resulting .elc in the /lisp dir.
Then I added the following lines to my .emacs file:
(global-font-lock-mode t)
(load-library "js2-20080616a.elc")
(autoload 'js2-mode "js2-20080616a" "javascript 1.7" t)<br>(setq auto-mode-alist (cons '("\\.js$" . js2-mode) auto-mode-alist))<br><br>This seemed to do the trick.<br><br>Thanks,<br>L-
"Education is when you read the fine print; experience is what you get when you don't." -Pete Seegerwww.lucid-edge.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement