How to make Emacs to support Verilog mode

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)))

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值