Function: verilog-header
verilog-header is an interactive and byte-compiled function defined in
verilog-mode.el.gz.
Signature
(verilog-header)
Documentation
Insert a standard Verilog file header.
See also verilog-sk-header for an alternative format.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/verilog-mode.el.gz
;; Added by Subbu Meiyappan for Header
(defun verilog-header ()
"Insert a standard Verilog file header.
See also `verilog-sk-header' for an alternative format."
(interactive)
(let ((start (point)))
(insert "\
//-----------------------------------------------------------------------------
// Title : <title>
// Project : <project>
//-----------------------------------------------------------------------------
// File : <filename>
// Author : <author>
// Created : <credate>
// Last modified : <moddate>
//-----------------------------------------------------------------------------
// Description :
// <description>
//-----------------------------------------------------------------------------
// Copyright (c) <copydate> by <company> This model is the confidential and
// proprietary property of <company> and the possession or use of this
// file requires a written license from <company>.
//------------------------------------------------------------------------------
// Modification history :
// <modhist>
//-----------------------------------------------------------------------------
")
(goto-char start)
(search-forward "<filename>")
(replace-match (buffer-name) t t)
(search-forward "<author>") (replace-match "" t t)
(insert (user-full-name))
(insert " <" (user-login-name) "@" (system-name) ">")
(search-forward "<credate>") (replace-match "" t t)
(verilog-insert-date)
(search-forward "<moddate>") (replace-match "" t t)
(verilog-insert-date)
(search-forward "<copydate>") (replace-match "" t t)
(verilog-insert-year)
(search-forward "<modhist>") (replace-match "" t t)
(verilog-insert-date)
(insert " : created")
(goto-char start)
(let (string)
(setq string (read-string "title: "))
(search-forward "<title>")
(replace-match string t t)
(setq string (read-string "project: " verilog-project))
(setq verilog-project string)
(search-forward "<project>")
(replace-match string t t)
(setq string (read-string "Company: " verilog-company))
(setq verilog-company string)
(search-forward "<company>")
(replace-match string t t)
(search-forward "<company>")
(replace-match string t t)
(search-forward "<company>")
(replace-match string t t)
(search-backward "<description>")
(replace-match "" t t))))