posts - 167,comments - 230,trackbacks - 0

Seven steps:
 
1. Download Emacs
2. Uncompress it to, for example, D:\emacs-22.1
3. create a site-lisp directory (may exist already)
4. Copy the verilog-mode.el to the file $EMACS\site-lisp\verilog-mode.el
5. Set up the HOME environment variable for Emacs. $HOME  D:\emacs-22.1
6. Create a file called D:\emacs-22.1\.emacs.el, using emacs, or note pad, whatever
7. Optionally run D:\emacs-22.1\bin\addpm.exe - this adds Emacs to the start menu and Desktop
 
--------------------------------------------------------------------------------

What is happening?
 
The first two steps install an emacs on your machine.
 
The third step adds a directory where you can install third party lisp routines (like verilog-mode). It is a really good idea to add your own customization lisp files for emacs into such a directory, rather than just copying them to one of the standard places, is so that later if you install a new version of emacs, you don't overwrite goodies that you have collected over the years.
 
In the fourth step you actually install the verilog-mode file in this site lisp directory.
 
In the fifth step you arrange it so upon startup, emacs will know where everything is.
 
In the sixth step you tell emacs that you want verilog files to come up in verilog mode.
 
The optional seventh step builds a quick launch icon that you can click on to launch the emacs. You can place this on your desktop, or in the quick launch bar, or in your My Documents so that emacs is easy to launch. 

--------------------------------------------------------------------------------

 .emacs.el content
 
;; Load verilog mode only when needed
(autoload 'verilog-mode "verilog-mode" "Verilog mode" t )
;; Any files that end in .v should be in verilog mode
(setq auto-mode-alist (cons  '("\\.v\\'" . verilog-mode) auto-mode-alist))
;; Any files in verilog mode should have their keywords colorized
(add-hook 'verilog-mode-hook '(lambda () (font-lock-mode 1)))

posted on 2008-03-30 22:23 Think Different 阅读(671) 评论(0)  编辑  收藏 所属分类: 技术