Commits

Anonymous committed 691b733

Update to author version 3.33.12. <m3psf9ao26.fsf@jerrypc.cs.usu.edu>

  • Participants
  • Parent commits 3a0ec82

Comments (0)

Files changed (5)

+2006-08-09  Jerry James  <james@xemacs.org>
+
+	* ChangeLog.upstream: Update from 3.33.12.
+	* vhdl-mode.el: Sync with 3.33.12.
+	* vhdl-mode.texi: Fix a minor typo.
+	* Makefile (AUTHOR_VERSION): Change to 3.33.12.
+
 2006-04-19  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.21 released.

ChangeLog.upstream

+2006-05-23  Reto Zimmermann  <reto@gnu.org>
+
+	* vhdl-mode.el: Version 3.33.12 released.
+	(vhdl-in-quote-p): Handle single quoted characters correctly.
+	(vhdl-begin-*-re): Fix indentation for "if/case ... use".
+	(vhdl-fixup-whitespace-region): Add "??" operator.
+	(vhdl-corresponding-end): Fix indentation for "if/case ... use".
+
+2006-05-16  Reto Zimmermann  <reto@gnu.org>
+
+	* vhdl-mode.el
+	(vhdl-align-region-2): Not align at end of line.
+	(vhdl-in-literal): Also check character quotes (single quote).
+	(vhdl-align-region-2): Fix in-literal checking.
+	(vhdl-fixup-whitespace-region): Add ?= ?/= ?> ?>= ?< ?<= operators.
+
+2006-05-15  Reto Zimmermann  <reto@gnu.org>
+
+	* vhdl-mode.el: Version 3.33.11 released.
+	(vhdl-fixup-whitespace-region): Correctly handle single '-'.
+	(vhdl-align-region-2, vhdl-fixup-whitespace-region): Handle at boi.
+	(vhdl-get-syntactic-context): Fix argument list indentation.
+
+2006-05-11  Reto Zimmermann  <reto@gnu.org>
+
+	* vhdl-mode.el: Version 3.33.10 released.
+	(vhdl-compile): Use relative path for compiled files by default.
+	(vhdl-compile-absolute-path): Use absolute path for compiled files.
+	(vhdl-begin-p): Fix indentation for "-- when".
+
+2006-04-12  Reto Zimmermann  <reto@gnu.org>
+
+	* vhdl-mode.el: Version 3.33.8 released.
+	(vhdl-compiler-alist): Add "Aldec" simulator.
+	(vhdl-get-visible-signals): Allow "port ..." in middle of line.
+	(vhdl-fixup-whitespace-region): Fix whitespace removal before comma.
+	(top): Update for VHDL'02 standard (add 'protected' keyword).
+
+2006-01-13  Reto Zimmermann  <reto@gnu.org>
+
+	* vhdl-mode.el:
+	(vhdl-mode): Remove 'fill-prefix' definition for XEmacs (breaks else).
+
 2005-12-09  Reto Zimmermann  <reto@gnu.org>
 
 	* vhdl-mode.el: Version 3.33.7 released.
 # Boston, MA 02111-1307, USA.
 
 VERSION = 1.21
-AUTHOR_VERSION = 3.33.8
+AUTHOR_VERSION = 3.33.12
 MAINTAINER = XEmacs Development Team <xemacs-beta@xemacs.org>
 PACKAGE = vhdl
 PKG_TYPE = regular
 ;;; vhdl-mode.el --- major mode for editing VHDL code
 
-;; Copyright (C) 1992-2005 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2006 Free Software Foundation, Inc.
 
 ;; Authors:     Reto Zimmermann <reto@gnu.org>
 ;;		Rodney J. Whitby <software.vhdl-mode@rwhitby.net>
 ;; Maintainer:	Reto Zimmermann <reto@gnu.org>
 ;; RCS:		$Id$
 ;; Keywords:	languages vhdl
-;; WWW:		http://opensource.ethz.ch/emacs/vhdl-mode.html
-
-(defconst vhdl-version "3.33.8"
+;; WWW:		http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html
+
+(defconst vhdl-version "3.33.12"
   "VHDL Mode version number.")
 
-(defconst vhdl-time-stamp "2005-12-09"
+(defconst vhdl-time-stamp "2006-05-23"
   "VHDL Mode time stamp for last update.")
 
 ;; This file is part of GNU Emacs.
 ;;   - Block commenting
 ;;   - Code fixing/alignment/beautification
 ;;   - Postscript printing
-;;   - VHDL'87/'93 and VHDL-AMS supported
+;;   - VHDL'87/'93/'02 and VHDL-AMS supported
 ;;   - Comprehensive menu
 ;;   - Fully customizable
 ;;   - Works under GNU Emacs (recommended) and XEmacs
 
 (defcustom vhdl-compiler-alist
   '(
+    ;; Aldec
+    ;; COMP96 ERROR COMP96_0078: "Unknown identifier "Addr_Bits"." "<filename>" 40 30
+    ("Aldec" "vcom" "-93 -work \\1" "make" "-f \\1"
+     nil "vlib \\1; vmap \\2 \\1" "./" "work/" "Makefile" "aldec"
+     (".+?[ \t]+\\(?:ERROR\\)[^:]+:.+?\\(?:.+\"\\(.+?\\)\"[ \t]+\\([0-9]+\\)\\)" 1 2 0) ("" 0)
+     nil)
     ;; Cadence Leapfrog: cv -file test.vhd
     ;; duluth: *E,430 (test.vhd,13): identifier (POSITIV) is not declared
     ("Cadence Leapfrog" "cv" "-work \\1 -file" "make" "-f \\1"
   "*VHDL standards used.
 Basic standard:
   VHDL'87      : IEEE Std 1076-1987
-  VHDL'93      : IEEE Std 1076-1993
+  VHDL'93/02   : IEEE Std 1076-1993/2002
 Additional standards:
   VHDL-AMS     : IEEE Std 1076.1 (analog-mixed-signal)
   Math packages: IEEE Std 1076.2 (`math_real', `math_complex')
       \"Activate Options\"."
   :type '(list (choice :tag "Basic standard"
 		       (const :tag "VHDL'87" 87)
-		       (const :tag "VHDL'93" 93))
+		       (const :tag "VHDL'93/02" 93))
 	       (set :tag "Additional standards" :indent 2
 		    (const :tag "VHDL-AMS" ams)
 		    (const :tag "Math packages" math)))
 
 (defcustom vhdl-intelligent-tab t
   "*Non-nil means `TAB' does indentation, word completion and tab insertion.
-That is, if preceeding character is part of a word then complete word,
+That is, if preceding character is part of a word then complete word,
 else if not at beginning of line then insert tab,
 else if last command was a `TAB' or `RET' then dedent one step,
 else indent current line (i.e. `TAB' is bound to `vhdl-electric-tab').
   (define-abbrev-table 'vhdl-mode-abbrev-table
     (append
      (when (memq 'vhdl vhdl-electric-keywords)
-       ;; VHDL'93 keywords
+       ;; VHDL'02 keywords
        '(
 	 ("--"		  "" vhdl-template-display-comment-hook 0)
 	 ("abs"		  "" vhdl-template-default-hook 0)
 	 ("postponed"	  "" vhdl-template-default-hook 0)
 	 ("procedure"	  "" vhdl-template-procedure-hook 0)
 	 ("process"	  "" vhdl-template-process-hook 0)
+	 ("protected"	  "" vhdl-template-default-hook 0)
 	 ("pure"	  "" vhdl-template-default-hook 0)
 	 ("range"	  "" vhdl-template-default-hook 0)
 	 ("record"	  "" vhdl-template-default-hook 0)
 				       (list '87 (cadr vhdl-standard)))
 	       (vhdl-activate-customizations))
 	:style radio :selected (eq '87 (car vhdl-standard))]
-       ["VHDL'93"
+       ["VHDL'93/02"
 	(progn (customize-set-variable 'vhdl-standard
 				       (list '93 (cadr vhdl-standard)))
 	       (vhdl-activate-customizations))
 
   VHDL STANDARDS:
     The VHDL standards to be used are specified in option `vhdl-standard'.
-    Available standards are: VHDL'87/'93, VHDL-AMS, and Math Packages.
+    Available standards are: VHDL'87/'93(02), VHDL-AMS, and Math Packages.
 
 
   KEYWORD CASE:
 to above mailing lists by sending an email to <reto@gnu.org>.
 
 VHDL Mode is officially distributed at
-http://opensource.ethz.ch/emacs/vhdl-mode.html
+http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html
 where the latest version can be found.
 
 
 Known problems:
 ---------------
 
-- Indentation bug in simultaneous if- and case-statements (VHDL-AMS).
 - XEmacs: Incorrect start-up when automatically opening speedbar.
 - XEmacs: Indentation in XEmacs 21.4 (and higher).
 
 ;;; Keywords and standardized words
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defconst vhdl-93-keywords
+(defconst vhdl-02-keywords
   '(
     "abs" "access" "after" "alias" "all" "and" "architecture" "array"
     "assert" "attribute"
     "map" "mod"
     "nand" "new" "next" "nor" "not" "null"
     "of" "on" "open" "or" "others" "out"
-    "package" "port" "postponed" "procedure" "process" "pure"
+    "package" "port" "postponed" "procedure" "process" "protected" "pure"
     "range" "record" "register" "reject" "rem" "report" "return"
     "rol" "ror"
     "select" "severity" "shared" "signal" "sla" "sll" "sra" "srl" "subtype"
     "wait" "when" "while" "with"
     "xnor" "xor"
     )
-  "List of VHDL'93 keywords.")
+  "List of VHDL'02 keywords.")
 
 (defconst vhdl-ams-keywords
   '(
     )
   "List of Verilog keywords as candidate for additional reserved words.")
 
-(defconst vhdl-93-types
+(defconst vhdl-02-types
   '(
     "boolean" "bit" "bit_vector" "character" "severity_level" "integer"
     "real" "time" "natural" "positive" "string" "line" "text" "side"
     "std_logic" "std_logic_vector"
     "std_ulogic" "std_ulogic_vector"
     )
-  "List of VHDL'93 standardized types.")
+  "List of VHDL'02 standardized types.")
 
 (defconst vhdl-ams-types
   '(
     )
   "List of Math Packages standardized types.")
 
-(defconst vhdl-93-attributes
+(defconst vhdl-02-attributes
   '(
     "base" "left" "right" "high" "low" "pos" "val" "succ"
     "pred" "leftof" "rightof" "range" "reverse_range"
     "simple_name" "instance_name" "path_name"
     "foreign"
     )
-  "List of VHDL'93 standardized attributes.")
+  "List of VHDL'02 standardized attributes.")
 
 (defconst vhdl-ams-attributes
   '(
     )
   "List of VHDL-AMS standardized attributes.")
 
-(defconst vhdl-93-enum-values
+(defconst vhdl-02-enum-values
   '(
     "true" "false"
     "note" "warning" "error" "failure"
     "fs" "ps" "ns" "us" "ms" "sec" "min" "hr"
     "right" "left"
     )
-  "List of VHDL'93 standardized enumeration values.")
+  "List of VHDL'02 standardized enumeration values.")
 
 (defconst vhdl-ams-enum-values
   '(
     )
   "List of Math Packages standardized constants.")
 
-(defconst vhdl-93-functions
+(defconst vhdl-02-functions
   '(
     "now" "resolved" "rising_edge" "falling_edge"
     "read" "readline" "write" "writeline" "endfile"
     "shl" "shr" "ext" "sxt"
     "deallocate"
     )
-  "List of VHDL'93 standardized functions.")
+  "List of VHDL'02 standardized functions.")
 
 (defconst vhdl-ams-functions
   '(
     )
   "List of Math Packages standardized functions.")
 
-(defconst vhdl-93-packages
+(defconst vhdl-02-packages
   '(
     "std_logic_1164" "numeric_std" "numeric_bit"
     "standard" "textio"
     "std_logic_misc" "std_logic_textio"
     "ieee" "std" "work"
     )
-  "List of VHDL'93 standardized packages and libraries.")
+  "List of VHDL'02 standardized packages and libraries.")
 
 (defconst vhdl-ams-packages
   '(
 (defun vhdl-words-init ()
   "Initialize reserved words."
   (setq vhdl-keywords
-	(append vhdl-93-keywords
+	(append vhdl-02-keywords
 		(when (vhdl-standard-p 'ams) vhdl-ams-keywords)))
   (setq vhdl-types
-	(append vhdl-93-types
+	(append vhdl-02-types
 		(when (vhdl-standard-p 'ams) vhdl-ams-types)
 		(when (vhdl-standard-p 'math) vhdl-math-types)))
   (setq vhdl-attributes
-	(append vhdl-93-attributes
+	(append vhdl-02-attributes
 		(when (vhdl-standard-p 'ams) vhdl-ams-attributes)))
   (setq vhdl-enum-values
-	(append vhdl-93-enum-values
+	(append vhdl-02-enum-values
 		(when (vhdl-standard-p 'ams) vhdl-ams-enum-values)))
   (setq vhdl-constants
 	(append (when (vhdl-standard-p 'math) vhdl-math-constants)))
   (setq vhdl-functions
-	(append vhdl-93-functions
+	(append vhdl-02-functions
 		(when (vhdl-standard-p 'ams) vhdl-ams-functions)
 		(when (vhdl-standard-p 'math) vhdl-math-functions)))
   (setq vhdl-packages
-	(append vhdl-93-packages
+	(append vhdl-02-packages
 		(when (vhdl-standard-p 'ams) vhdl-ams-packages)
 		(when (vhdl-standard-p 'math) vhdl-math-packages)))
   (setq vhdl-reserved-words
   "Check if point is in a string."
   (eq (vhdl-in-literal) 'string))
 
+(defun vhdl-in-quote-p ()
+  "Check if point is in a quote ('x')."
+  (or (and (> (point) (point-min))
+	   (< (1+ (point)) (point-max))
+	   (= (char-before (point)) ?\')
+	   (= (char-after (1+ (point))) ?\'))
+      (and (> (1- (point)) (point-min))
+	   (< (point) (point-max))
+	   (= (char-before (1- (point))) ?\')
+	   (= (char-after (point)) ?\'))))
+
 (defun vhdl-in-literal ()
   "Determine if point is in a VHDL literal."
   (save-excursion
 	   "is"))))
 
 (defconst vhdl-begin-fwd-re
-  "\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\|units\\|record\\|for\\)\\b\\([^_]\\|\\'\\)"
+  "\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\(\\s-+body\\)?\\|units\\|use\\|record\\|for\\)\\b\\([^_]\\|\\'\\)"
   "A regular expression for searching forward that matches all known
 \"begin\" keywords.")
 
 (defconst vhdl-begin-bwd-re
-  "\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\|units\\|record\\|for\\)\\b[^_]"
+  "\\b\\(is\\|begin\\|block\\|component\\|generate\\|then\\|else\\|loop\\|process\\|procedural\\(\\s-+body\\)?\\|units\\|use\\|record\\|for\\)\\b[^_]"
   "A regular expression for searching backward that matches all known
 \"begin\" keywords.")
 
 	   (and (/= (following-char) ?\;)
 		(not (looking-at "is\\|begin\\|process\\|procedural\\|block")))))
     t)
-   ;; "begin", "then":
-   ((looking-at "be\\|t")
+   ;; "begin", "then", "use":
+   ((looking-at "be\\|t\\|use")
     t)
    ;; "else":
    ((and (looking-at "e")
 	 ;; make sure that the "else" isn't inside a
 	 ;; conditional signal assignment.
 	 (save-excursion
-	   (re-search-backward ";\\|\\bwhen\\b[^_]" lim 'move)
+	   (vhdl-re-search-backward ";\\|\\bwhen\\b[^_]" lim 'move)
 	   (or (eq (following-char) ?\;)
 	       (eq (point) lim))))
     t)
   (cond
    ((looking-at "is\\|block\\|generate\\|process\\|procedural")
     "begin")
-   ((looking-at "then")
+   ((looking-at "then\\|use")
     "<else>")
    (t
     "end")))
 of an identifier that just happens to contain a \"begin\" keyword."
   (save-excursion
     (and (looking-at vhdl-begin-fwd-re)
+	 (or (not (looking-at "\\<use\\>"))
+	     (save-excursion (back-to-indentation)
+			     (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>")))
 	 (/= (preceding-char) ?_)
 	 (not (vhdl-in-literal))
 	 (vhdl-begin-p lim)
 			      (vhdl-backward-skip-label lim)
 			      (vhdl-first-word (point)))))))
 	  ;; "component", "units", "record":
-	  ((looking-at "[cur]")
+	  ((looking-at "c\\|un\\|r")
 	   ;; The first end found will close the block
 	   (vector "end" nil))
 	  ;; "block", "process", "procedural":
 			 (vhdl-backward-skip-label lim)
 			 (vhdl-first-word (point))))))
 	  ;; "then":
-	  ((looking-at "t")
-	   (vector "elsif\\|else\\|end\\s-+if"
+	  ((looking-at "t\\|use")
+	   (vector "elsif\\|else\\|end\\s-+\\(if\\|use\\)"
 		   (and (vhdl-last-word (point))
 			(or (vhdl-first-word (point))
 			    (save-excursion
 	       (vhdl-end-p lim))
 	  (if (looking-at "el")
 	      ;; "else", "elsif":
-	      (vector "if\\|elsif" (vhdl-first-word (point)) "then" nil)
+	      (vector "if\\|elsif" (vhdl-first-word (point)) "then\\|use" nil)
 	    ;; "end ...":
 	    (setq pos (point))
 	    (forward-sexp)
 	     ((looking-at "if\\b[^_]")
 	      (vector "else\\|elsif\\|if"
 		      (vhdl-first-word pos)
-		      "else\\|then" nil))
+		      "else\\|then\\|use" nil))
 	     ;; "end component":
 	     ((looking-at "component\\b[^_]")
 	      (vector (buffer-substring (match-beginning 1)
 	  )))
 
 (defconst vhdl-trailer-re
-  "\\b\\(is\\|then\\|generate\\|loop\\|record\\)\\b[^_]")
+  "\\b\\(is\\|then\\|generate\\|loop\\|record\\|use\\)\\b[^_]")
 
 (defconst vhdl-statement-fwd-re
   "\\b\\(if\\|for\\|while\\)\\b\\([^_]\\|\\'\\)"
 	(cond
 	 ;; "begin" keyword:
 	 ((and (looking-at vhdl-begin-fwd-re)
+	       (or (not (looking-at "\\<use\\>"))
+		   (save-excursion (back-to-indentation)
+				   (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>")))
 	       (/= (preceding-char) ?_)
 	       (vhdl-begin-p lim))
 	  (setq foundp 'begin))
 	    nil
 	  (backward-sexp)
 	  (if (and (looking-at vhdl-begin-fwd-re)
+		   (or (not (looking-at "\\<use\\>"))
+		       (save-excursion
+			 (back-to-indentation)
+			 (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>")))
 		   (/= (preceding-char) ?_)
 		   (not (vhdl-in-literal))
 		   (vhdl-begin-p lim))
 	    (setq donep t)))
 	 ;; If we are looking at a "begin", then stop
 	 ((and (looking-at vhdl-begin-fwd-re)
+	       (or (not (looking-at "\\<use\\>"))
+		   (save-excursion
+		     (back-to-indentation)
+		     (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>")))
 	       (/= (preceding-char) ?_)
 	       (vhdl-begin-p nil))
 	  ;; If it's a leader "begin", then find the
 	(setq begin-after-ip (and
 			      (not literal)
 			      (looking-at vhdl-begin-fwd-re)
+			      (or (not (looking-at "\\<use\\>"))
+				  (save-excursion
+				    (back-to-indentation)
+				    (looking-at "\\(\\w+\\s-*:\\s-*\\)?\\<\\(case\\|elsif\\|if\\)\\>")))
 			      (vhdl-begin-p)))
 	(setq end-after-ip (and
 			    (not literal)
 		 (save-excursion
 		   (vhdl-beginning-of-statement-1 containing-sexp)
 		   (skip-chars-backward " \t(")
+		   (while (= (preceding-char) ?\;)
+		     (vhdl-beginning-of-statement-1 containing-sexp)
+		     (skip-chars-backward " \t("))
 		   (<= (point) containing-sexp)))
 	    (goto-char containing-sexp)
 	    (vhdl-add-syntax 'arglist-cont-nonempty (vhdl-point 'boi)))
 ;; Indentation commands
 
 (defun vhdl-electric-tab (&optional prefix-arg)
-  "If preceeding character is part of a word or a paren then hippie-expand,
+  "If preceding character is part of a word or a paren then hippie-expand,
 else if right of non whitespace on line then insert tab,
 else if last command was a tab or return then dedent one step or if a comment
 toggle between normal indent and inline comment indent,
       (while (< bol end)
 	(save-excursion
 	  (when (and (re-search-forward match eol t)
-		     (not (vhdl-in-literal)))
+		     (save-excursion
+		       (goto-char (match-beginning 0))
+		       (and (not (vhdl-in-literal))
+			    (not (vhdl-in-quote-p))))
+		     (not (looking-at "\\s-*$")))
 	    (setq distance (- (match-beginning substr) bol))
 	    (when (> distance max)
 	      (setq max distance))))
       (setq eol (save-excursion (end-of-line) (point)))
       (while (> lines 0)
   	(when (and (re-search-forward match eol t)
-		   (not (vhdl-in-literal)))
+		   (save-excursion
+		     (goto-char (match-beginning 0))
+		     (and (not (vhdl-in-literal))
+			  (not (vhdl-in-quote-p))))
+		   (not (looking-at "\\s-*$"))
+		   (> (match-beginning 0)  ; not if at boi
+		      (save-excursion (back-to-indentation) (point))))
 	  (setq width (- (match-end substr) (match-beginning substr)))
 	  (setq distance (- (match-beginning substr) bol))
 	  (goto-char (match-beginning substr))
     (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\)\\|\\(\\s-*\\([,;]\\)\\)" end t)
       (if (match-string 1)
 	  (goto-char (match-end 1))
-	(replace-match "\\3 " nil nil nil 3)))
+	(replace-match "\\3 " nil nil nil 2)))
     ;; have no space after `('
     (goto-char beg)
     (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\)\\|\\((\\)\\s-+" end t)
 	(replace-match "\\2")))
     ;; surround operator symbols by one space
     (goto-char beg)
-    (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\)\\|\\(\\([^/:<>=]\\)\\(:\\|=\\|<\\|>\\|:=\\|<=\\|>=\\|=>\\|/=\\)\\([^=>]\\|$\\)\\)" end t)
-      (if (match-string 1)
-	  (goto-char (match-end 1))
+    (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\|\'.\'\\)\\|\\(\\([^/:<>=]\\)\\(:\\|\\??=\\|\\??<\\|\\??>\\|:=\\|\\??<=\\|\\??>=\\|=>\\|\\??/=\\|\\?\\?\\)\\([^=>]\\|$\\)\\)" end t)
+      (if (or (match-string 1)
+	      (<= (match-beginning 0)  ; not if at boi
+		 (save-excursion (back-to-indentation) (point))))
+	  (goto-char (match-end 0))
 	(replace-match "\\3 \\4 \\5")
 	(goto-char (match-end 2))))
     ;; eliminate multiple spaces and spaces at end of line
 		    (progn (replace-match "  " nil nil) t))
 	       (and (looking-at "\\s-+") (re-search-forward "\\s-+" end t)
 		    (progn (replace-match " " nil nil) t))
+	       (and (looking-at "-") (re-search-forward "-" end t))
 ;	       (re-search-forward "[^ \t-]+" end t))))
 	       (re-search-forward "[^ \t\"-]+" end t))))
   (unless no-message (message "Fixing up whitespace...done")))
 	 (goto-char (point-min))
 	 (if (not (re-search-forward (concat "^entity\\s-+" entity-name "\\>") nil t))
 	     (error "ERROR:  Entity \"%s\" not found:\n  --> see option `vhdl-entity-file-name'" entity-name)
-	   (when (setq beg (re-search-forward
-			    "^\\s-*port[ \t\n]*("
+	   (when (setq beg (vhdl-re-search-forward
+			    "\\<port[ \t\n]*("
 			    (save-excursion
 			      (re-search-forward "^end\\>" nil t)) t))
 	     (setq end (save-excursion
        (while (search-forward "<standard>" end t)
 	 (replace-match
 	  (concat "VHDL" (cond ((vhdl-standard-p '87) "'87")
-			       ((vhdl-standard-p '93) "'93"))
+			       ((vhdl-standard-p '93) "'93/02"))
 		  (when (vhdl-standard-p 'ams) ", VHDL-AMS")
 		  (when (vhdl-standard-p 'math) ", Math Packages")) t t))
        (goto-char beg)
   (if vhdl-upper-case-keywords (upcase-word num) (downcase-word num)))
 
 (defun vhdl-minibuffer-tab (&optional prefix-arg)
-  "If preceeding character is part of a word or a paren then hippie-expand,
+  "If preceding character is part of a word or a paren then hippie-expand,
 else insert tab (used for word completion in VHDL minibuffer)."
   (interactive "P")
   (cond
     (save-excursion
       (beginning-of-line)
       ;; search backward for block beginning or end
-      (while (or (while (and (setq pos (re-search-backward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\|record\\|units\\)\\|\\(\\w+[ \t\n]*:[ \t\n]*\\)?\\(postponed[ \t\n]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\)\\)\\>" nil t))
+      (while (or (while (and (setq pos (re-search-backward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\(\\s-+body\\)?\\|record\\|units\\)\\|\\(\\w+[ \t\n]*:[ \t\n]*\\)?\\(postponed[ \t\n]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\)\\)\\>" nil t))
 			     ;; not consider subprogram declarations
 			     (or (and (match-string 5)
 				      (save-match-data
     (save-excursion
       (end-of-line)
       ;; search forward for block beginning or end
-      (while (or (while (and (setq pos (re-search-forward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\|record\\|units\\)\\|\\(\\w+[ \t\n]*:[ \t\n]*\\)?\\(postponed[ \t\n]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\)\\)\\>" nil t))
+      (while (or (while (and (setq pos (re-search-forward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\(\\s-+body\\)?\\|record\\|units\\)\\|\\(\\w+[ \t\n]*:[ \t\n]*\\)?\\(postponed[ \t\n]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\)\\)\\>" nil t))
 			     ;; not consider subprogram declarations
 			     (or (and (match-string 5)
 				      (save-match-data
 ;; Scan functions
 
 (defun vhdl-scan-context-clause ()
-  "Scan the context clause that preceeds a design unit."
+  "Scan the context clause that precedes a design unit."
   (let (lib-alist)
     (save-excursion
       (when (re-search-backward "^[ \t]*\\(architecture\\|configuration\\|entity\\|package\\)\\>" nil t)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Compilation
 
+(defvar vhdl-compile-absolute-path nil
+  "If non-nil, use absolute instead of relative path for compiled files.")
+
 (defun vhdl-compile-init ()
   "Initialize for compilation."
   (when (or (null compilation-error-regexp-alist)
 	 (compiler (or (aget vhdl-compiler-alist vhdl-compiler nil)
 		       (error "ERROR:  No such compiler: \"%s\"" vhdl-compiler)))
 	 (command (nth 0 compiler))
-	 (file-name (buffer-file-name))
+	 (default-directory (vhdl-compile-directory))
+	 (file-name (if vhdl-compile-absolute-path
+			(buffer-file-name)
+		      (file-relative-name (buffer-file-name))))
 	 (options (vhdl-get-compile-options project compiler file-name))
-	 (default-directory (vhdl-compile-directory))
 	 compilation-process-setup-function)
     (unless (file-directory-p default-directory)
       (error "ERROR:  Compile directory does not exist: \"%s\"" default-directory))
     (when (string-match " " file-name)
       (setq file-name (concat "\"" file-name "\"")))
     ;; print out file name if compiler does not
-    (setq vhdl-compile-file-name (buffer-file-name))
+    (setq vhdl-compile-file-name (if vhdl-compile-absolute-path
+				     (buffer-file-name)
+				   (file-relative-name (buffer-file-name))))
     (when (and (= 0 (nth 1 (nth 10 compiler)))
 	       (= 0 (nth 1 (nth 11 compiler))))
       (setq compilation-process-setup-function 'vhdl-compile-print-file-name))
 Reserved words in VHDL
 ----------------------
 
-VHDL'93 (IEEE Std 1076-1993):
-  `vhdl-93-keywords'      : keywords
-  `vhdl-93-types'         : standardized types
-  `vhdl-93-attributes'    : standardized attributes
-  `vhdl-93-enum-values'   : standardized enumeration values
-  `vhdl-93-functions'     : standardized functions
-  `vhdl-93-packages'      : standardized packages and libraries
+VHDL'93/02 (IEEE Std 1076-1993/2002):
+  `vhdl-02-keywords'      : keywords
+  `vhdl-02-types'         : standardized types
+  `vhdl-02-attributes'    : standardized attributes
+  `vhdl-02-enum-values'   : standardized enumeration values
+  `vhdl-02-functions'     : standardized functions
+  `vhdl-02-packages'      : standardized packages and libraries
 
 VHDL-AMS (IEEE Std 1076.1):
   `vhdl-ams-keywords'     : keywords
 This manual is not very up-to-date. It basically contains the
 indentation machine documentation by Rod Whitby with only minor
 adaptions. A short documentation of the entire VHDL Mode is available
-within the mode itself by typing @kbd{C-c C-h}. Also, all commands and
+within the mode itself by typing @kbd{C-c C-h}. Also, all commands and the
 customization of most variables is available through the menu, which
 makes everything highly self-explaining.