Skip to content

Instantly share code, notes, and snippets.

@creamidea
Created January 12, 2014 08:05
Show Gist options
  • Save creamidea/8382122 to your computer and use it in GitHub Desktop.
Save creamidea/8382122 to your computer and use it in GitHub Desktop.
emace verilog-mode in windows7 configure
;; ===================================================
;; For verilog mode
(add-to-list 'load-path "~/.emacs.d/lisp/verilog-mode.el")
(require 'verilog-mode)
(add-to-list 'auto-mode-alist '("\\.vl$" . verilog-mode))
(defun prepend-path ( my-path )
(setq load-path (cons (expand-file-name my-path) load-path)))
(defun append-path ( my-path )
(setq load-path (append load-path (list (expand-file-name my-path)))))
;; Look first in the directory ~/elisp for elisp files
(prepend-path "~/elisp")
;; Load verilog mode only when needed
(autoload 'verilog-mode "verilog-mode" "Verilog mode" t )
;; Any files that end in .v, .dv or .sv should be in verilog mode
(add-to-list 'auto-mode-alist '("\\.[ds]?v\\'" . verilog-mode))
;; Any files in verilog mode should have their keywords colorized
(add-hook 'verilog-mode-hook '(lambda () (font-lock-mode 1)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment