Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Xemacs vhdl-mode.el editing/compiling question

 
Thread Tools Search this Thread
Old 06-09-2008, 04:03 PM   #1
Default Xemacs vhdl-mode.el editing/compiling question


Hello,

I am trying make Xemacs comform to my VHDL style guide so I can open a .vhd file and have most of the stuff that I always need declared already.

I have been playing around with the colors and syntax so when I type "library" it turns Blue and Bold, etc. And I've done some other stuff that has to do with the init.el file.

I was wondering if it was possible to edit the vhdl-mode.el file to perform the following syntax:

LIBRARY <library name>;
<tab> USE <library name>.<package name>.ALL;

Note: the only difference between what is already implemented in vhdl-mode and what I want is that <Tab> before the USE function.

I found in the vhdl-mode.el file where this is built I've tried changing the following:

(defun vhdl-template-library ()
"Insert a library specification."
(interactive)
(let ((margin (current-indentation))
(start (point))
name end-pos)
(vhdl-insert-keyword "LIBRARY ")
(when (setq name (vhdl-template-field "names" nil t start (point)))
(insert ";")
(unless (string-match "," name)
(setq end-pos (point))
(insert "\n")
*** (indent-to margin) ****
(vhdl-insert-keyword "USE ")
(insert name)
(vhdl-insert-keyword "..ALL;")
(backward-char 5)
(if (vhdl-template-field "package name")
(forward-char 5)
(delete-region end-pos (+ (point) 5)))))))

I tried changing the part marked with **** ***** to the following:
(indent-to (+ margin vhdl-basic-offset)

then I tried byte-compiling. saving. exiting Xemacs and restarting. and trying the library function again. it doesn't seem to be working...any ideas?

If you need clarification please let me know. Thanks!

also does anyone know a good website that has a lot of windows friendly bindings? I found one for the scroll button on the mouse and start up VHDL mode automatically..ie

;;start-up in VHDL mode
(require 'vhdl-mode)

(setq auto-mode-alist
(append
'(("\\.vhd$" . vhdl-mode)
) auto-mode-alist))

any other good ones would be apreciated!

Thanks #2


bluesforsalvador
bluesforsalvador is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Dial-up Modem Question w_tom A+ Certification 0 09-18-2005 09:12 PM
"Installing two drives" question - what next? Jim A+ Certification 12 08-07-2005 01:19 PM
Re: Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good God DVD Video 3 04-25-2005 04:19 PM
Re: Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good Filthy Mcnasty DVD Video 0 04-25-2005 04:29 AM
Re: Safe Mode Question (A+ question) Gordon Findlay A+ Certification 0 06-16-2004 10:48 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46