Xemacs vhdl-mode.el editing/compiling question

Joined
Jun 9, 2008
Messages
2
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top