I'm new in emacs 'world' and i want to install php/html/css mode on
windows. Someone can help me ?
Sorry about my english i'm a frenchie :>
Thanks alot.
Well, a common way of 'installing' modes in emacs is a case of putting the
mode's source code elisp files (.el) in a place where they can be found by
emacs, i.e., in a directory listed in the `load-path' variable, and then having
them autoloaded at start-up.
So, create an elisp directory in your home directory;
/home/jeessy/elisp
for instance. Next, add the following line to your /home/jeessy/.emacs file;
(add-to-list 'load-path "/home/jeessy/elisp")
Most modes are entered using an interactive command such as 'M-x css-mode', and
assuming the elisp source is called 'css.el', you then need to add the following
line anywhere after the previous line;
(autoload 'css-mode "css" "CSS editing mode" t nil)
| | |
M-x css-mode | |
| |
source file css.el |
|
This can be anything
Save your .emacs file, quit emacs (assuming you've been using it to edit your
.emacs file) and re-launch. You should be on your way. Just type M-x css-mode
and enjoy :-)
sebyte
P.S. I'm not sure about Windows when it comes to home directories :-/
>> Sorry about my english i'm a frenchie :>
You may also post to the french group fcae:
<fr.comp.applications.emacs> - au cas où!
--
Bastien
> Hi, thank you for your reply but on Bill gates'os emacs version i
> can't find the .emacs file :|
Maybe you don't have one yet ? Did you ever customized / installed
something else with emacs ?
Let's try with emacs : open ~/.emacs (C-x C-f ~/.emacs) the '~' sign
stands for your home directory. If the file exist Emacs will open it,
else it will create a new file.
And the ~ directory location depends on your windows system and the
environment : Emacs (and some other programs too) looks for the $HOME
environment variable.
If it is not defined, your ~ directory will probably be c:\ or
c:\documents and settings\your account\
To define the $HOME variable, look into c:\autoexec.bat for the 95/98/Me
family and add line with a SET HOME=path\of\your\choice
To define that variable with NT4/W2k/XP, look into the system icon in
the control panel, there is a button that lets you define the
environment.
Once the variable set you might have to reboot (95/98/Me) or simply
restart Emacs.
And as said Bastien : il y a un groupe *français* pour Emacs
(fr.comp.applications.emacs) ;o)
HTH.
--
Sébastien Kirche
Emacs will automatically go to what is considered your home directory
and attempt to open this file. You can see which directory you're in
by executing a dired command from within this file (C-x d)
Alternately, you can set the home environment variable to the
directory of your choosing. I have cygwin installed, and have set the
home directory to c:/cygwin/home/cmcmahan. Works just like a unix
environment for me (with a few caveats).
I set up my environment variables from within my .tcshrc, then launch
emacs from that shell to inherit them on startup. I avoid messing with
the windows environment, but can customize my emacs and cygwin
variables to my heart's content!
- Chris
jee...@gmail.com writes:
> Hi, thank you for your reply but on Bill gates'os emacs version i
> can't find the .emacs file :|
>
--
(. .)
=ooO=(_)=Ooo=====================================
Chris McMahan | first_init...@one.dot.net
=================================================
So you now have some useful Windows info.
In short you have to create your own ~/.emacs if you don't have one.
Emacs will read then read it at start-up.
It's such a plain and simple file, but don't call it ~/.emacs.txt !!!
It must be ~/.emacs (or $HOME/.emacs).
You can just copy and paste this if you like:
sebyte
;; my ~/.emacs
;;
;; elsip (emacs lisp) uses semi-colons for comments
(add-to-list 'load-path "/home/jeessy/elisp") ;change according to Windows'
;requirements
(autoload 'css-mode "css-mode" "CSS editing mode" t nil) ;"css-mode" corresponds
;to the filename
(global-font-lock-mode 1) ;this will ensure syntax highlighting works
;; end of your ~/.emacs
;;
;; very soon this will be two pages long :-)
> ;; end of your ~/.emacs
> ;;
> ;; very soon this will be two pages long :-)
Only two pages ? Mine is currently 44kb long ;o)
--
Sébastien Kirche
I said _very soon_ ;-)