From 0a2e512a77cee619a5a566064abbb3a4591025ae Mon Sep 17 00:00:00 2001 From: Romain Francoise Date: Wed, 31 Aug 2005 19:53:52 +0000 Subject: [PATCH] Merge vhdl-mode.el version 3.33.6, from Reto Zimmermann . --- lisp/ChangeLog | 59 ++ lisp/progmodes/vhdl-mode.el | 1899 +++++++++++++++++++++-------------- 2 files changed, 1203 insertions(+), 755 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 783e36f6a29..9b6ae700ba1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,62 @@ +2005-08-31 Reto Zimmermann + + * progmodes/vhdl-mode.el + (vhdl-update-sensitivity-list): Handle multi-dimensional array + access. + (vhdl-end-p): Fix indentation bug "else" after "-- when". + (vhdl-set-default-project): New function (easier setting of + default). + (vhdl-port-copy): Handle extended identifiers for generics. + (vhdl-compiler-alist): Better description for error message + regexp. + (vhdl-make): Query for target, use previous as default. + (vhdl-port-copy): Fix port copy for port names starting with + "signal". + (vhdl-font-lock-keywords-2): Fix fontification for record + el. assign. + (vhdl-speedbar-make-subpack-line): Add package body link. + (vhdl-generate-makefile-1): Not include itself as dependency. + (vhdl-font-lock-init): Highlight c-preprocessor directives. + (vhdl-*ward-syntactic-ws): Skip c-preprocessor directives. + (vhdl-get-syntactic-context): Handle c-preprocessor directives. + (vhdl-update-sensitivity-list): Start scan at opening parenthesis. + (vhdl-fixup-whitespace-region): Fix jumping point (infinite loop). + (vhdl-update-sensitivity-list-buffer): Add string argument for + `error'. + (vhdl-import-project): Add string argument for `error'. + (vhdl-compose-configuration, + vhdl-compose-configuration-architecture): Add configuration + declaration generation. + (vhdl-scan-directory-contents): Scan for block/generate hierarchy. + (vhdl-trailer-re): Add "record" keyword (better indentation). + (vhdl-fixup-whitespace-region): "[^ \t\"-]+" instead of + "[^ \t-\"]+". + (vhdl-font-lock-keywords-2): Not highlight formal parameter after + '|'. + (vhdl-testbench-entity-file-name, + vhdl-testbench-architecture-file-name): Allow separate + customization of testbench file names. + (vhdl-beginning-of-block): Handle optional subprogram parameter + list. + (vhdl-get-visible-signals): Allow newline within alias + declaration. + (vhdl-update-sensitivity-list): Signal read only on certain + attributes. + (vhdl-fixup-whitespace-region): Fix bug with strings (double + quotes). + (member-ignore-case): Alias for missing function in XEmacs. + (vhdl-compiler-alist): Add unit-to-file name mapping for Cadence + NC. + (vhdl-update-sensitivity-list): Ignore case on read signals. + (vhdl-replace-string): Adjust case only for file names. + (vhdl-update-sensitivity-list): Fix search for read signals. + (vhdl-update-sensitivity-list): Exclude formal parameters. + (vhdl-get-visible-signals): Include aliases of signals. + (vhdl-get-visible-signals): Fix signal name searching. + (vhdl-port-flatten, vhdl-port-reverse-direction): Better message. + (vhdl-fixup-whitespace-region): Fix for character + literals (e.g. ':'). + 2005-08-31 Juanma Barranquero * ansi-color.el (comint-last-output-start): diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 6971235d7c2..8e4cba6d527 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -4,13 +4,14 @@ ;; Authors: Reto Zimmermann ;; Rodney J. Whitby -;; Maintainer: FSF (Because Reto Zimmermann seems to have disappeared) +;; Maintainer: Reto Zimmermann ;; Keywords: languages vhdl +;; WWW: http://opensource.ethz.ch/emacs/vhdl-mode.html -(defconst vhdl-version "3.32.12" +(defconst vhdl-version "3.33.6" "VHDL Mode version number.") -(defconst vhdl-time-stamp "2003-02-28" +(defconst vhdl-time-stamp "2005-08-30" "VHDL Mode time stamp for last update.") ;; This file is part of GNU Emacs. @@ -43,6 +44,8 @@ ;; - Insertion of file headers ;; - Insertion of user-specified models ;; - Port translation / testbench generation +;; - Structural composition +;; - Configuration generation ;; - Sensitivity list updating ;; - File browser ;; - Design hierarchy browser @@ -126,7 +129,9 @@ "Non-nil if XEmacs is used.") ;; Emacs 21+ handling (defconst vhdl-emacs-21 (and (<= 21 emacs-major-version) (not vhdl-xemacs)) - "Non-nil if Emacs 21, 22, ... is used.") + "Non-nil if GNU Emacs 21, 22, ... is used.") +(defconst vhdl-emacs-22 (and (<= 22 emacs-major-version) (not vhdl-xemacs)) + "Non-nil if GNU Emacs 22, ... is used.") (defvar compilation-file-regexp-alist) (defvar itimer-version) @@ -180,7 +185,7 @@ Examples: "Customizations for VHDL Mode." :prefix "vhdl-" :group 'languages -; :version "20.4" ; comment out for XEmacs +; :version "21.2" ; comment out for XEmacs ) (defgroup vhdl-mode nil @@ -228,7 +233,8 @@ Overrides local variable `indent-tabs-mode'." ("Cadence NC" "ncvhdl" "-work \\1" "make" "-f \\1" nil "mkdir \\1" "./" "work/" "Makefile" "ncvhdl" ("ncvhdl_p: \\*E,\\w+ (\\(.+\\),\\([0-9]+\\)|\\([0-9]+\\)):" 1 2 3) ("" 0) - nil) + ("\\1/entity/pc.db" "\\2/\\1/pc.db" "\\1/configuration/pc.db" + "\\1/package/pc.db" "\\1/body/pc.db" downcase)) ;; Ikos Voyager: analyze test.vhd ;; analyze test.vhd ;; E L4/C5: this library unit is inaccessible @@ -343,7 +349,7 @@ Compiler: Makefile name : name of Makefile (default is \"Makefile\") ID string : compiler identification string (see `vhdl-project-alist') Error message: - Regexp : regular expression to match error messages + Regexp : regular expression to match error messages (*) File subexp index: index of subexpression that matches the file name Line subexp index: index of subexpression that matches the line number Column subexp idx: index of subexpression that matches the column number @@ -356,6 +362,9 @@ Unit-to-file name mapping: mapping of library unit names to names of files \"\\2\" inserts the entity name for architectures) Case adjustment : adjust case of inserted unit names +\(*) The regular expression must match the error message starting from the + beginning of the line (but not necessarily to the end of the line). + Compile options allows insertion of the library name (see `vhdl-project-alist') in order to set the compilers library option (e.g. \"vcom -work my_lib\"). @@ -385,8 +394,8 @@ assigning its name to option `vhdl-compiler'. Please send any missing or erroneous compiler properties to the maintainer for updating. -NOTE: Reflect the new setting in the choice list of option `vhdl-compiler' - by restarting Emacs." +NOTE: Activate new error and file message regexps and reflect the new setting + in the choice list of option `vhdl-compiler' by restarting Emacs." :type '(repeat (list :tag "Compiler" :indent 2 (string :tag "Compiler name ") @@ -426,7 +435,7 @@ NOTE: Reflect the new setting in the choice list of option `vhdl-compiler' (const :tag "Upcase" upcase) (const :tag "Downcase" downcase)))))) :set (lambda (variable value) - (vhdl-custom-set variable value 'vhdl-update-mode-menu)) + (vhdl-custom-set variable value 'vhdl-update-mode-menu)) :group 'vhdl-compile) (defcustom vhdl-compiler "ModelSim" @@ -589,7 +598,7 @@ NOTE: Reflect the new setting in the choice list of option `vhdl-project' (string :tag "Description: (type `C-j' for newline)" :format "%t\n%v\n"))) :set (lambda (variable value) - (vhdl-custom-set variable value + (vhdl-custom-set variable value 'vhdl-update-mode-menu 'vhdl-speedbar-refresh)) :group 'vhdl-project) @@ -666,7 +675,7 @@ NOTE: Activate the new setting in a VHDL buffer by using the menu entry (const :tag "VHDL-AMS" ams) (const :tag "Math packages" math))) :set (lambda (variable value) - (vhdl-custom-set variable value + (vhdl-custom-set variable value 'vhdl-template-map-init 'vhdl-mode-abbrev-table-init 'vhdl-template-construct-alist-init @@ -686,7 +695,7 @@ This value is used by + and - symbols in `vhdl-offsets-alist'." This is done when typed or expanded or by the fix case functions." :type 'boolean :set (lambda (variable value) - (vhdl-custom-set variable value 'vhdl-abbrev-list-init)) + (vhdl-custom-set variable value 'vhdl-abbrev-list-init)) :group 'vhdl-style) (defcustom vhdl-upper-case-types nil @@ -694,7 +703,7 @@ This is done when typed or expanded or by the fix case functions." This is done when expanded or by the fix case functions." :type 'boolean :set (lambda (variable value) - (vhdl-custom-set variable value 'vhdl-abbrev-list-init)) + (vhdl-custom-set variable value 'vhdl-abbrev-list-init)) :group 'vhdl-style) (defcustom vhdl-upper-case-attributes nil @@ -702,7 +711,7 @@ This is done when expanded or by the fix case functions." This is done when expanded or by the fix case functions." :type 'boolean :set (lambda (variable value) - (vhdl-custom-set variable value 'vhdl-abbrev-list-init)) + (vhdl-custom-set variable value 'vhdl-abbrev-list-init)) :group 'vhdl-style) (defcustom vhdl-upper-case-enum-values nil @@ -710,7 +719,7 @@ This is done when expanded or by the fix case functions." This is done when expanded or by the fix case functions." :type 'boolean :set (lambda (variable value) - (vhdl-custom-set variable value 'vhdl-abbrev-list-init)) + (vhdl-custom-set variable value 'vhdl-abbrev-list-init)) :group 'vhdl-style) (defcustom vhdl-upper-case-constants t @@ -718,7 +727,7 @@ This is done when expanded or by the fix case functions." This is done when expanded." :type 'boolean :set (lambda (variable value) - (vhdl-custom-set variable value 'vhdl-abbrev-list-init)) + (vhdl-custom-set variable value 'vhdl-abbrev-list-init)) :group 'vhdl-style) (defcustom vhdl-use-direct-instantiation 'standard @@ -753,9 +762,22 @@ taken from the file name of the current buffer." "*Specifies how the architecture file name is obtained. The architecture file name can be obtained by modifying the entity and/or architecture name (e.g. attaching or stripping off a substring). The -string that is matched against the regexp is the concatenation of the entity -and the architecture name separated by a space. This gives access to both -names (see default setting as example)." +file extension is automatically taken from the file name of the current +buffer. The string that is matched against the regexp is the concatenation +of the entity and the architecture name separated by a space. This gives +access to both names (see default setting as example)." + vhdl-name-doc-string) + :type '(cons (regexp :tag "From regexp") + (string :tag "To string ")) + :group 'vhdl-naming + :group 'vhdl-compose) + +(defcustom vhdl-configuration-file-name '(".*" . "\\&") + (concat + "*Specifies how the configuration file name is obtained. +The configuration file name can be obtained by modifying the configuration +name (e.g. attaching or stripping off a substring). The file extension is +automatically taken from the file name of the current buffer." vhdl-name-doc-string) :type '(cons (regexp :tag "From regexp") (string :tag "To string ")) @@ -767,7 +789,9 @@ names (see default setting as example)." "*Specifies how the package file name is obtained. The package file name can be obtained by modifying the package name (e.g. attaching or stripping off a substring). The file extension is automatically -taken from the file name of the current buffer." +taken from the file name of the current buffer. Package files can be created +in a different directory by prepending a relative or absolute path to the +file name." vhdl-name-doc-string) :type '(cons (regexp :tag "From regexp") (string :tag "To string ")) @@ -801,7 +825,7 @@ follows: :type '(set (const :tag "VHDL keywords" vhdl) (const :tag "User model keywords" user)) :set (lambda (variable value) - (vhdl-custom-set variable value 'vhdl-mode-abbrev-table-init)) + (vhdl-custom-set variable value 'vhdl-mode-abbrev-table-init)) :group 'vhdl-template) (defcustom vhdl-optional-labels 'process @@ -1035,7 +1059,7 @@ begin -- process