aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2008-02-20 16:15:03 +0000
committerDan Nicolaescu2008-02-20 16:15:03 +0000
commit90639effc5233e5fed2234d652a9b8b9e2f1b38f (patch)
tree3ecc1250d840313334322517c72fe06280b65458
parent219d93b8b4e14cf639c2032e5f31b60590b44b1f (diff)
downloademacs-90639effc5233e5fed2234d652a9b8b9e2f1b38f.tar.gz
emacs-90639effc5233e5fed2234d652a9b8b9e2f1b38f.zip
* progmodes/verilog-mode.el (customize): Fix typo in error message.
(verilog-mode, verilog-mode-indent, verilog-mode-actions) (verilog-mode-auto, verilog-indent-level-module) (verilog-minimum-comment-distance, verilog-library-flags) (verilog-library-directories, verilog-library-files) (verilog-auto-reset-widths, verilog-imenu-generic-expression) (verilog-xemacs-menu, verilog-set-compile-command) (verilog-set-compile-command, verilog-mode-syntax-table, verilog-mode) (verilog-get-expr, verilog-strip-comments, verilog-one-line) (verilog-lint-off, verilog-batch-auto, verilog-batch-delete-auto) (verilog-batch-inject-auto, verilog-batch-indent) (verilog-continued-line, verilog-type-keywords) (verilog-read-sub-decls-sig, verilog-read-sub-decls-line) (verilog-read-inst-pins, verilog-read-arg-pins) (verilog-read-auto-template, verilog-read-signals, verilog-getopt-file) (verilog-add-list-unique, verilog-symbol-detick, verilog-modi-filename) (verilog-auto-star, verilog-auto-inst, verilog-auto-wire) (verilog-enum-ascii, verilog-sk-begin, verilog-sk-fork) (verilog-sk-datadef, verilog-colorize-include-files-buffer) (verilog-mode-version, verilog-mode-release-date) (verilog-mode-release-emacs, verilog-linter, verilog-coverage) (verilog-simulator, verilog-compiler) (verilog-auto-sense-defines-constant, verilog-company) (verilog-project, verilog-mark-defun, verilog-submit-bug-report): Fix typos in docstrings. (verilog-set-auto-endcomments, verilog-calculate-indent) (verilog-inject-auto, verilog-auto-arg, verilog-auto-inout-module): Reflow docstrings. (verilog-tab-always-indent, verilog-highlight-p1800-keywords) (verilog-auto-star-save, verilog-auto-inst-vector, verilog-mode-hook) (electric-verilog-forward-sexp, verilog-in-case-region-p) (verilog-in-struct-region-p, verilog-in-generate-region-p) (verilog-leap-to-head, verilog-current-indent-level) (verilog-case-indent-level, verilog-cpp-keywords) (verilog-defun-keywords, verilog-block-keywords, verilog-tf-keywords) (verilog-case-keywords, verilog-separator-keywords, verilog-completion) (verilog-signals-not-in, verilog-symbol-detick-text) (verilog-modi-cache-preserve-tick, verilog-modi-cache-preserve-buffer) (verilog-forward-close-paren, verilog-backward-open-paren) (verilog-backward-open-bracket): Doc fixes.
-rw-r--r--lisp/ChangeLog43
-rw-r--r--lisp/progmodes/verilog-mode.el283
2 files changed, 184 insertions, 142 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 20a51a2ecc6..c73bae11aff 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,46 @@
12008-02-20 Juanma Barranquero <lekktu@gmail.com>
2
3 * progmodes/verilog-mode.el (customize): Fix typo in error message.
4 (verilog-mode, verilog-mode-indent, verilog-mode-actions)
5 (verilog-mode-auto, verilog-indent-level-module)
6 (verilog-minimum-comment-distance, verilog-library-flags)
7 (verilog-library-directories, verilog-library-files)
8 (verilog-auto-reset-widths, verilog-imenu-generic-expression)
9 (verilog-xemacs-menu, verilog-set-compile-command)
10 (verilog-set-compile-command, verilog-mode-syntax-table, verilog-mode)
11 (verilog-get-expr, verilog-strip-comments, verilog-one-line)
12 (verilog-lint-off, verilog-batch-auto, verilog-batch-delete-auto)
13 (verilog-batch-inject-auto, verilog-batch-indent)
14 (verilog-continued-line, verilog-type-keywords)
15 (verilog-read-sub-decls-sig, verilog-read-sub-decls-line)
16 (verilog-read-inst-pins, verilog-read-arg-pins)
17 (verilog-read-auto-template, verilog-read-signals, verilog-getopt-file)
18 (verilog-add-list-unique, verilog-symbol-detick, verilog-modi-filename)
19 (verilog-auto-star, verilog-auto-inst, verilog-auto-wire)
20 (verilog-enum-ascii, verilog-sk-begin, verilog-sk-fork)
21 (verilog-sk-datadef, verilog-colorize-include-files-buffer)
22 (verilog-mode-version, verilog-mode-release-date)
23 (verilog-mode-release-emacs, verilog-linter, verilog-coverage)
24 (verilog-simulator, verilog-compiler)
25 (verilog-auto-sense-defines-constant, verilog-company)
26 (verilog-project, verilog-mark-defun, verilog-submit-bug-report):
27 Fix typos in docstrings.
28 (verilog-set-auto-endcomments, verilog-calculate-indent)
29 (verilog-inject-auto, verilog-auto-arg, verilog-auto-inout-module):
30 Reflow docstrings.
31 (verilog-tab-always-indent, verilog-highlight-p1800-keywords)
32 (verilog-auto-star-save, verilog-auto-inst-vector, verilog-mode-hook)
33 (electric-verilog-forward-sexp, verilog-in-case-region-p)
34 (verilog-in-struct-region-p, verilog-in-generate-region-p)
35 (verilog-leap-to-head, verilog-current-indent-level)
36 (verilog-case-indent-level, verilog-cpp-keywords)
37 (verilog-defun-keywords, verilog-block-keywords, verilog-tf-keywords)
38 (verilog-case-keywords, verilog-separator-keywords, verilog-completion)
39 (verilog-signals-not-in, verilog-symbol-detick-text)
40 (verilog-modi-cache-preserve-tick, verilog-modi-cache-preserve-buffer)
41 (verilog-forward-close-paren, verilog-backward-open-paren)
42 (verilog-backward-open-bracket): Doc fixes.
43
12008-02-20 Glenn Morris <rgm@gnu.org> 442008-02-20 Glenn Morris <rgm@gnu.org>
2 45
3 * mail/rmail.el (rmail-autodetect): Add .exe extension to movemail 46 * mail/rmail.el (rmail-autodetect): Add .exe extension to movemail
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 4e2b726625f..65bee027d6c 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -70,7 +70,7 @@
70;; <http://www.verilog.com/emacs_install.html> 70;; <http://www.verilog.com/emacs_install.html>
71 71
72;; The short list of installation instructions are: To set up 72;; The short list of installation instructions are: To set up
73;; automatic Verilog mode, put this file in your load path, and put 73;; automatic verilog mode, put this file in your load path, and put
74;; the following in code (please un comment it first!) in your 74;; the following in code (please un comment it first!) in your
75;; .emacs, or in your site's site-load.el 75;; .emacs, or in your site's site-load.el
76 76
@@ -108,7 +108,7 @@
108;; 108;;
109 109
110;;; History: 110;;; History:
111;; 111;;
112;; See commit history at http://www.veripool.com/verilog-mode.html 112;; See commit history at http://www.veripool.com/verilog-mode.html
113;; (This section is required to appease checkdoc.) 113;; (This section is required to appease checkdoc.)
114 114
@@ -203,7 +203,7 @@ STRING should be given if the last search was by `string-match' on STRING."
203 (defmacro defgroup (&rest args) nil) 203 (defmacro defgroup (&rest args) nil)
204 (defmacro customize (&rest args) 204 (defmacro customize (&rest args)
205 (message 205 (message
206 "Sorry, Customize is not available with this version of Emacs")) 206 "Sorry, Customize is not available with this version of emacs"))
207 (defmacro defcustom (var value doc &rest args) 207 (defmacro defcustom (var value doc &rest args)
208 `(defvar ,var ,value ,doc)) 208 `(defvar ,var ,value ,doc))
209 ) 209 )
@@ -282,7 +282,7 @@ STRING should be given if the last search was by `string-match' on STRING."
282 (or (equal value t) (equal value nil))) 282 (or (equal value t) (equal value nil)))
283 283
284(defgroup verilog-mode nil 284(defgroup verilog-mode nil
285 "Facilitates easy editing of Verilog source text." 285 "Facilitates easy editing of Verilog source text"
286 :group 'languages) 286 :group 'languages)
287 287
288; (defgroup verilog-mode-fonts nil 288; (defgroup verilog-mode-fonts nil
@@ -291,20 +291,20 @@ STRING should be given if the last search was by `string-match' on STRING."
291; :group 'verilog-mode) 291; :group 'verilog-mode)
292 292
293(defgroup verilog-mode-indent nil 293(defgroup verilog-mode-indent nil
294 "Customize indentation and highlighting of Verilog source text." 294 "Customize indentation and highlighting of verilog source text"
295 :group 'verilog-mode) 295 :group 'verilog-mode)
296 296
297(defgroup verilog-mode-actions nil 297(defgroup verilog-mode-actions nil
298 "Customize actions on Verilog source text." 298 "Customize actions on verilog source text"
299 :group 'verilog-mode) 299 :group 'verilog-mode)
300 300
301(defgroup verilog-mode-auto nil 301(defgroup verilog-mode-auto nil
302 "Customize AUTO actions when expanding Verilog source text." 302 "Customize AUTO actions when expanding verilog source text"
303 :group 'verilog-mode) 303 :group 'verilog-mode)
304 304
305(defcustom verilog-linter 305(defcustom verilog-linter
306 "echo 'No verilog-linter set, see \"M-x describe-variable verilog-linter\"'" 306 "echo 'No verilog-linter set, see \"M-x describe-variable verilog-linter\"'"
307 "*Unix program and arguments to call to run a lint checker on Verilog source. 307 "*Unix program and arguments to call to run a lint checker on verilog source.
308Depending on the `verilog-set-compile-command', this may be invoked when 308Depending on the `verilog-set-compile-command', this may be invoked when
309you type \\[compile]. When the compile completes, \\[next-error] will take 309you type \\[compile]. When the compile completes, \\[next-error] will take
310you to the next lint error." 310you to the next lint error."
@@ -314,7 +314,7 @@ you to the next lint error."
314 314
315(defcustom verilog-coverage 315(defcustom verilog-coverage
316 "echo 'No verilog-coverage set, see \"M-x describe-variable verilog-coverage\"'" 316 "echo 'No verilog-coverage set, see \"M-x describe-variable verilog-coverage\"'"
317 "*Program and arguments to use to annotate for coverage Verilog source. 317 "*Program and arguments to use to annotate for coverage verilog source.
318Depending on the `verilog-set-compile-command', this may be invoked when 318Depending on the `verilog-set-compile-command', this may be invoked when
319you type \\[compile]. When the compile completes, \\[next-error] will take 319you type \\[compile]. When the compile completes, \\[next-error] will take
320you to the next lint error." 320you to the next lint error."
@@ -324,7 +324,7 @@ you to the next lint error."
324 324
325(defcustom verilog-simulator 325(defcustom verilog-simulator
326 "echo 'No verilog-simulator set, see \"M-x describe-variable verilog-simulator\"'" 326 "echo 'No verilog-simulator set, see \"M-x describe-variable verilog-simulator\"'"
327 "*Program and arguments to use to interpret Verilog source. 327 "*Program and arguments to use to interpret verilog source.
328Depending on the `verilog-set-compile-command', this may be invoked when 328Depending on the `verilog-set-compile-command', this may be invoked when
329you type \\[compile]. When the compile completes, \\[next-error] will take 329you type \\[compile]. When the compile completes, \\[next-error] will take
330you to the next lint error." 330you to the next lint error."
@@ -334,7 +334,7 @@ you to the next lint error."
334 334
335(defcustom verilog-compiler 335(defcustom verilog-compiler
336 "echo 'No verilog-compiler set, see \"M-x describe-variable verilog-compiler\"'" 336 "echo 'No verilog-compiler set, see \"M-x describe-variable verilog-compiler\"'"
337 "*Program and arguments to use to compile Verilog source. 337 "*Program and arguments to use to compile verilog source.
338Depending on the `verilog-set-compile-command', this may be invoked when 338Depending on the `verilog-set-compile-command', this may be invoked when
339you type \\[compile]. When the compile completes, \\[next-error] will take 339you type \\[compile]. When the compile completes, \\[next-error] will take
340you to the next lint error." 340you to the next lint error."
@@ -370,7 +370,7 @@ entry \"Fontify Buffer\"). XEmacs: turn off and on font locking."
370(put 'verilog-indent-level 'safe-local-variable 'integerp) 370(put 'verilog-indent-level 'safe-local-variable 'integerp)
371 371
372(defcustom verilog-indent-level-module 3 372(defcustom verilog-indent-level-module 3
373 "*Indentation of Module level Verilog statements (eg always, initial). 373 "*Indentation of Module level Verilog statements. (eg always, initial)
374Set to 0 to get initial and always statements lined up on the left side of 374Set to 0 to get initial and always statements lined up on the left side of
375your screen." 375your screen."
376 :group 'verilog-mode-indent 376 :group 'verilog-mode-indent
@@ -451,7 +451,7 @@ Set to 0 to have all directives start at the left side of the screen."
451 451
452(defcustom verilog-tab-always-indent t 452(defcustom verilog-tab-always-indent t
453 "*True means TAB should always re-indent the current line. 453 "*True means TAB should always re-indent the current line.
454A nil value means TAB will only reindent when at the beginning of the line." 454Nil means TAB will only reindent when at the beginning of the line."
455 :group 'verilog-mode-indent 455 :group 'verilog-mode-indent
456 :type 'boolean) 456 :type 'boolean)
457(put 'verilog-tab-always-indent 'safe-local-variable 'verilog-booleanp) 457(put 'verilog-tab-always-indent 'safe-local-variable 'verilog-booleanp)
@@ -480,7 +480,7 @@ Otherwise else is lined up with first character on line holding matching if."
480(defcustom verilog-minimum-comment-distance 10 480(defcustom verilog-minimum-comment-distance 10
481 "*Minimum distance (in lines) between begin and end required before a comment. 481 "*Minimum distance (in lines) between begin and end required before a comment.
482Setting this variable to zero results in every end acquiring a comment; the 482Setting this variable to zero results in every end acquiring a comment; the
483default avoids too many redundant comments in tight quarters." 483default avoids too many redundant comments in tight quarters"
484 :group 'verilog-mode-indent 484 :group 'verilog-mode-indent
485 :type 'integer) 485 :type 'integer)
486(put 'verilog-minimum-comment-distance 'safe-local-variable 'integerp) 486(put 'verilog-minimum-comment-distance 'safe-local-variable 'integerp)
@@ -530,9 +530,9 @@ would become
530 "*True means highlight words newly reserved by IEEE-1800. 530 "*True means highlight words newly reserved by IEEE-1800.
531These will appear in `verilog-font-lock-p1800-face' in order to gently 531These will appear in `verilog-font-lock-p1800-face' in order to gently
532suggest changing where these words are used as variables to something else. 532suggest changing where these words are used as variables to something else.
533A nil value means highlight these words as appropriate for the SystemVerilog 533Nil means highlight these words as appropriate for the SystemVerilog
534IEEE-1800 standard. Note that changing this will require restarting Emacs 534IEEE-1800 standard. Note that changing this will require restarting Emacs
535to see the effect as font color choices are cached by Emacs." 535to see the effect as font color choices are cached by Emacs"
536 :group 'verilog-mode-indent 536 :group 'verilog-mode-indent
537 :type 'boolean) 537 :type 'boolean)
538(put 'verilog-highlight-p1800-keywords 'safe-local-variable 'verilog-booleanp) 538(put 'verilog-highlight-p1800-keywords 'safe-local-variable 'verilog-booleanp)
@@ -577,8 +577,8 @@ instantiation. See also `verilog-auto-star' and `verilog-auto-star-save'."
577 577
578(defcustom verilog-auto-star-save nil 578(defcustom verilog-auto-star-save nil
579 "*Non-nil indicates to save to disk SystemVerilog .* instance expansions. 579 "*Non-nil indicates to save to disk SystemVerilog .* instance expansions.
580A nil value indicates direct connections will be removed before saving. 580Nil indicates direct connections will be removed before saving. Only
581Only meaningful to those created due to `verilog-auto-star-expand' being set. 581meaningful to those created due to `verilog-auto-star-expand' being set.
582 582
583Instead of setting this, you may want to use /*AUTOINST*/, which will 583Instead of setting this, you may want to use /*AUTOINST*/, which will
584always be saved." 584always be saved."
@@ -624,7 +624,7 @@ always be saved."
624 ; Leda 624 ; Leda
625 ("In file \\([^ \t]+\\)[ \t]+line[ \t]+\\([0-9]+\\):\n[^\n]*\n[^\n]*\n\\[\\(Warning\\|Error\\|Failure\\)\\][^\n]*" 1 2) 625 ("In file \\([^ \t]+\\)[ \t]+line[ \t]+\\([0-9]+\\):\n[^\n]*\n[^\n]*\n\\[\\(Warning\\|Error\\|Failure\\)\\][^\n]*" 1 2)
626 ) 626 )
627; "*List of regexps for Verilog compilers, like verilint. See compilation-error-regexp-alist for the formatting." 627; "*List of regexps for verilog compilers, like verilint. See compilation-error-regexp-alist for the formatting."
628) 628)
629 629
630(defvar verilog-error-font-lock-keywords 630(defvar verilog-error-font-lock-keywords
@@ -697,7 +697,7 @@ something like:
697 // End: 697 // End:
698 698
699Verilog-mode attempts to detect changes to this local variable, but they 699Verilog-mode attempts to detect changes to this local variable, but they
700are only insured to be correct when the file is first visited. Thus if you 700are only insured to be correct when the file is first visited. Thus if you
701have problems, use \\[find-alternate-file] RET to have these take effect. 701have problems, use \\[find-alternate-file] RET to have these take effect.
702 702
703See also the variables mentioned above." 703See also the variables mentioned above."
@@ -719,7 +719,7 @@ something like:
719 // End: 719 // End:
720 720
721Verilog-mode attempts to detect changes to this local variable, but they 721Verilog-mode attempts to detect changes to this local variable, but they
722are only insured to be correct when the file is first visited. Thus if you 722are only insured to be correct when the file is first visited. Thus if you
723have problems, use \\[find-alternate-file] RET to have these take effect. 723have problems, use \\[find-alternate-file] RET to have these take effect.
724 724
725See also `verilog-library-flags', `verilog-library-files' 725See also `verilog-library-flags', `verilog-library-files'
@@ -742,7 +742,7 @@ something like:
742 // End: 742 // End:
743 743
744Verilog-mode attempts to detect changes to this local variable, but they 744Verilog-mode attempts to detect changes to this local variable, but they
745are only insured to be correct when the file is first visited. Thus if you 745are only insured to be correct when the file is first visited. Thus if you
746have problems, use \\[find-alternate-file] RET to have these take effect. 746have problems, use \\[find-alternate-file] RET to have these take effect.
747 747
748See also `verilog-library-flags', `verilog-library-directories'." 748See also `verilog-library-flags', `verilog-library-directories'."
@@ -777,7 +777,7 @@ included."
777 "*If true, AUTOSENSE should assume all defines represent constants. 777 "*If true, AUTOSENSE should assume all defines represent constants.
778When true, the defines will not be included in sensitivity lists. To 778When true, the defines will not be included in sensitivity lists. To
779maintain compatibility with other sites, this should be set at the bottom 779maintain compatibility with other sites, this should be set at the bottom
780of each Verilog file that requires it, rather than being set globally." 780of each verilog file that requires it, rather than being set globally."
781 :group 'verilog-mode-auto 781 :group 'verilog-mode-auto
782 :type 'boolean) 782 :type 'boolean)
783(put 'verilog-auto-sense-defines-constant 'safe-local-variable 'verilog-booleanp) 783(put 'verilog-auto-sense-defines-constant 'safe-local-variable 'verilog-booleanp)
@@ -787,7 +787,7 @@ of each Verilog file that requires it, rather than being set globally."
787This is then used to set the width of the zero (32'h0 for example). This 787This is then used to set the width of the zero (32'h0 for example). This
788is required by some lint tools that aren't smart enough to ignore widths of 788is required by some lint tools that aren't smart enough to ignore widths of
789the constant zero. This may result in ugly code when parameters determine 789the constant zero. This may result in ugly code when parameters determine
790the MSB or LSB of a signal inside an AUTORESET." 790the MSB or LSB of a signal inside a AUTORESET."
791 :type 'boolean 791 :type 'boolean
792 :group 'verilog-mode-auto) 792 :group 'verilog-mode-auto)
793(put 'verilog-auto-reset-widths 'safe-local-variable 'verilog-booleanp) 793(put 'verilog-auto-reset-widths 'safe-local-variable 'verilog-booleanp)
@@ -802,8 +802,8 @@ the MSB or LSB of a signal inside an AUTORESET."
802 "*If true, when creating default ports with AUTOINST, use bus subscripts. 802 "*If true, when creating default ports with AUTOINST, use bus subscripts.
803If nil, skip the subscript when it matches the entire bus as declared in 803If nil, skip the subscript when it matches the entire bus as declared in
804the module (AUTOWIRE signals always are subscripted, you must manually 804the module (AUTOWIRE signals always are subscripted, you must manually
805declare the wire to have the subscripts removed.) Setting this to nil may 805declare the wire to have the subscripts removed.) Nil may speed up some
806speed up some simulators, but is less general and harder to read, so avoid." 806simulators, but is less general and harder to read, so avoid."
807 :group 'verilog-mode-auto 807 :group 'verilog-mode-auto
808 :type 'boolean) 808 :type 'boolean)
809(put 'verilog-auto-inst-vector 'safe-local-variable 'verilog-booleanp) 809(put 'verilog-auto-inst-vector 'safe-local-variable 'verilog-booleanp)
@@ -856,7 +856,7 @@ For example, \"_t$\" matches typedefs named with _t, as in the C language."
856(put 'verilog-typedef-regexp 'safe-local-variable 'stringp) 856(put 'verilog-typedef-regexp 'safe-local-variable 'stringp)
857 857
858(defcustom verilog-mode-hook 'verilog-set-compile-command 858(defcustom verilog-mode-hook 'verilog-set-compile-command
859 "*Hook run after Verilog mode is loaded." 859 "*Hook (List of functions) run after verilog mode is loaded."
860 :type 'hook 860 :type 'hook
861 :group 'verilog-mode) 861 :group 'verilog-mode)
862 862
@@ -893,7 +893,7 @@ For example, \"_t$\" matches typedefs named with _t, as in the C language."
893(defvar verilog-imenu-generic-expression 893(defvar verilog-imenu-generic-expression
894 '((nil "^\\s-*\\(\\(m\\(odule\\|acromodule\\)\\)\\|primitive\\)\\s-+\\([a-zA-Z0-9_.:]+\\)" 4) 894 '((nil "^\\s-*\\(\\(m\\(odule\\|acromodule\\)\\)\\|primitive\\)\\s-+\\([a-zA-Z0-9_.:]+\\)" 4)
895 ("*Vars*" "^\\s-*\\(reg\\|wire\\)\\s-+\\(\\|\\[[^]]+\\]\\s-+\\)\\([A-Za-z0-9_]+\\)" 3)) 895 ("*Vars*" "^\\s-*\\(reg\\|wire\\)\\s-+\\(\\|\\[[^]]+\\]\\s-+\\)\\([A-Za-z0-9_]+\\)" 3))
896 "Imenu expression for Verilog mode. See `imenu-generic-expression'.") 896 "Imenu expression for Verilog-mode. See `imenu-generic-expression'.")
897 897
898;; 898;;
899;; provide a verilog-header function. 899;; provide a verilog-header function.
@@ -905,12 +905,12 @@ If nil, in European format (e.g. 17.09.1997). The brain-dead American
905format (e.g. 09/17/1997) is not supported.") 905format (e.g. 09/17/1997) is not supported.")
906 906
907(defvar verilog-company nil 907(defvar verilog-company nil
908 "*Default name of Company for Verilog header. 908 "*Default name of Company for verilog header.
909If set will become buffer local.") 909If set will become buffer local.")
910(make-variable-buffer-local 'verilog-company) 910(make-variable-buffer-local 'verilog-company)
911 911
912(defvar verilog-project nil 912(defvar verilog-project nil
913 "*Default name of Project for Verilog header. 913 "*Default name of Project for verilog header.
914If set will become buffer local.") 914If set will become buffer local.")
915(make-variable-buffer-local 'verilog-project) 915(make-variable-buffer-local 'verilog-project)
916 916
@@ -993,14 +993,14 @@ If set will become buffer local.")
993 ) 993 )
994 ("Move" 994 ("Move"
995 ,(if (featurep 'xemacs) 995 ,(if (featurep 'xemacs)
996 (progn 996 (progn
997 ["Beginning of function" verilog-beg-of-defun t] 997 ["Beginning of function" verilog-beg-of-defun t]
998 ["End of function" verilog-end-of-defun t] 998 ["End of function" verilog-end-of-defun t]
999 ["Mark function" verilog-mark-defun t]) 999 ["Mark function" verilog-mark-defun t])
1000 ["Beginning of function" beginning-of-defun t] 1000 ["Beginning of function" beginning-of-defun t]
1001 ["End of function" end-of-defun t] 1001 ["End of function" end-of-defun t]
1002 ["Mark function" mark-defun t]) 1002 ["Mark function" mark-defun t])
1003 1003
1004 ["Goto function/module" verilog-goto-defun t] 1004 ["Goto function/module" verilog-goto-defun t]
1005 ["Move to beginning of block" electric-verilog-backward-sexp t] 1005 ["Move to beginning of block" electric-verilog-backward-sexp t]
1006 ["Move to end of block" electric-verilog-forward-sexp t] 1006 ["Move to end of block" electric-verilog-forward-sexp t]
@@ -1059,7 +1059,7 @@ If set will become buffer local.")
1059 ["Customize Verilog Mode..." verilog-customize t] 1059 ["Customize Verilog Mode..." verilog-customize t]
1060 ["Customize Verilog Fonts & Colors" verilog-font-customize t] 1060 ["Customize Verilog Fonts & Colors" verilog-font-customize t]
1061 ) 1061 )
1062 "Emacs menu for Verilog mode." 1062 "Emacs menu for VERILOG mode."
1063 ) 1063 )
1064(defvar verilog-statement-menu 1064(defvar verilog-statement-menu
1065 '("Statements" 1065 '("Statements"
@@ -1200,7 +1200,7 @@ so there may be a large up front penalty for the first search."
1200 1200
1201;; compilation program 1201;; compilation program
1202(defun verilog-set-compile-command () 1202(defun verilog-set-compile-command ()
1203 "Function to compute shell command to compile Verilog. 1203 "Function to compute shell command to compile verilog.
1204 1204
1205This reads `verilog-tool' and sets `compile-command'. This specifies the 1205This reads `verilog-tool' and sets `compile-command'. This specifies the
1206program that executes when you type \\[compile] or 1206program that executes when you type \\[compile] or
@@ -1221,8 +1221,8 @@ In the former case, the path to the current buffer is concat'ed to the
1221value of `verilog-tool'; in the later, the path to the current buffer is 1221value of `verilog-tool'; in the later, the path to the current buffer is
1222substituted for the %s. 1222substituted for the %s.
1223 1223
1224Where __FILE__ appears in the string, the `buffer-file-name' of the 1224Where __FILE__ appears in the string, the buffer-file-name of the current
1225current buffer, without the directory portion, will be substituted." 1225buffer, without the directory portion, will be substituted."
1226 (interactive) 1226 (interactive)
1227 (cond 1227 (cond
1228 ((or (file-exists-p "makefile") ;If there is a makefile, use it 1228 ((or (file-exists-p "makefile") ;If there is a makefile, use it
@@ -1754,7 +1754,7 @@ find the errors."
1754 (modify-syntax-entry ?* ". 23" table) 1754 (modify-syntax-entry ?* ". 23" table)
1755 (modify-syntax-entry ?\n "> b" table)) 1755 (modify-syntax-entry ?\n "> b" table))
1756 table) 1756 table)
1757 "Syntax table used in Verilog mode buffers.") 1757 "Syntax table used in `verilog-mode' buffers.")
1758 1758
1759(defvar verilog-font-lock-keywords nil 1759(defvar verilog-font-lock-keywords nil
1760 "Default highlighting for Verilog mode.") 1760 "Default highlighting for Verilog mode.")
@@ -1993,7 +1993,7 @@ Use filename, if current buffer being edited shorten to just buffer name."
1993 (verilog-backward-sexp)) 1993 (verilog-backward-sexp))
1994 1994
1995(defun electric-verilog-forward-sexp () 1995(defun electric-verilog-forward-sexp ()
1996 "Move forward over a sexp." 1996 "Move backward over a sexp."
1997 (interactive) 1997 (interactive)
1998 ;; before that see if we are in a comment 1998 ;; before that see if we are in a comment
1999 (verilog-forward-sexp)) 1999 (verilog-forward-sexp))
@@ -2213,10 +2213,9 @@ Variables controlling indentation/edit style:
2213 Set to 0 to get them list right under containing block. 2213 Set to 0 to get them list right under containing block.
2214 `verilog-indent-level-behavioral' (default 3) 2214 `verilog-indent-level-behavioral' (default 3)
2215 Indentation of first begin in a task or function block 2215 Indentation of first begin in a task or function block
2216 Set to 0 to get such code to lined up underneath the task or 2216 Set to 0 to get such code to lined up underneath the task or function keyword
2217 function keyword.
2218 `verilog-indent-level-directive' (default 1) 2217 `verilog-indent-level-directive' (default 1)
2219 Indentation of `ifdef/`endif blocks. 2218 Indentation of `ifdef/`endif blocks
2220 `verilog-cexp-indent' (default 1) 2219 `verilog-cexp-indent' (default 1)
2221 Indentation of Verilog statements broken across lines i.e.: 2220 Indentation of Verilog statements broken across lines i.e.:
2222 if (a) 2221 if (a)
@@ -2227,13 +2226,13 @@ Variables controlling indentation/edit style:
2227 Non-nil means automatically newline after semicolons and the punctuation 2226 Non-nil means automatically newline after semicolons and the punctuation
2228 mark after an end. 2227 mark after an end.
2229 `verilog-auto-indent-on-newline' (default t) 2228 `verilog-auto-indent-on-newline' (default t)
2230 Non-nil means automatically indent line after newline. 2229 Non-nil means automatically indent line after newline
2231 `verilog-tab-always-indent' (default t) 2230 `verilog-tab-always-indent' (default t)
2232 Non-nil means TAB in Verilog mode should always reindent the current line, 2231 Non-nil means TAB in Verilog mode should always reindent the current line,
2233 regardless of where in the line point is when the TAB command is used. 2232 regardless of where in the line point is when the TAB command is used.
2234 `verilog-indent-begin-after-if' (default t) 2233 `verilog-indent-begin-after-if' (default t)
2235 Non-nil means to indent begin statements following a preceding 2234 Non-nil means to indent begin statements following a preceding
2236 if, else, while, for and repeat statements, if any. Otherwise, 2235 if, else, while, for and repeat statements, if any. otherwise,
2237 the begin is lined up with the preceding token. If t, you get: 2236 the begin is lined up with the preceding token. If t, you get:
2238 if (a) 2237 if (a)
2239 begin // amount of indent based on `verilog-cexp-indent' 2238 begin // amount of indent based on `verilog-cexp-indent'
@@ -2368,7 +2367,7 @@ Key bindings specific to `verilog-mode-map' are:
2368 (add-hook 'font-lock-after-fontify-buffer-hook 'verilog-colorize-include-files-buffer t t) ; not in emacs 20 2367 (add-hook 'font-lock-after-fontify-buffer-hook 'verilog-colorize-include-files-buffer t t) ; not in emacs 20
2369 (add-hook 'after-change-functions 'verilog-colorize-include-files t t) 2368 (add-hook 'after-change-functions 'verilog-colorize-include-files t t)
2370 2369
2371 ;; Tell imenu how to handle Verilog. 2370 ;; Tell imenu how to handle verilog.
2372 (make-local-variable 'imenu-generic-expression) 2371 (make-local-variable 'imenu-generic-expression)
2373 (setq imenu-generic-expression verilog-imenu-generic-expression) 2372 (setq imenu-generic-expression verilog-imenu-generic-expression)
2374 ;; hideshow support 2373 ;; hideshow support
@@ -2640,7 +2639,7 @@ following code fragment:
2640 (verilog-insert-1 "%3.3d" max)) 2639 (verilog-insert-1 "%3.3d" max))
2641 2640
2642(defun verilog-mark-defun () 2641(defun verilog-mark-defun ()
2643 "Mark the current Verilog function (or procedure). 2642 "Mark the current verilog function (or procedure).
2644This puts the mark at the end, and point at the beginning." 2643This puts the mark at the end, and point at the beginning."
2645 (interactive) 2644 (interactive)
2646 (when (featurep 'xemacs) 2645 (when (featurep 'xemacs)
@@ -2873,8 +2872,8 @@ With ARG, first kill any existing labels."
2873 pos))) 2872 pos)))
2874 2873
2875(defun verilog-in-case-region-p () 2874(defun verilog-in-case-region-p ()
2876 "Return true if in a case region. 2875 "Return TRUE if in a case region;
2877More specifically, point @ in the line foo : @ begin" 2876more specifically, point @ in the line foo : @ begin"
2878 (interactive) 2877 (interactive)
2879 (save-excursion 2878 (save-excursion
2880 (if (and 2879 (if (and
@@ -2899,9 +2898,10 @@ More specifically, point @ in the line foo : @ begin"
2899 (t 2898 (t
2900 (throw 'found (= nest 0))))))) 2899 (throw 'found (= nest 0)))))))
2901 nil))) 2900 nil)))
2901
2902(defun verilog-in-struct-region-p () 2902(defun verilog-in-struct-region-p ()
2903 "Return true if in a struct region. 2903 "Return TRUE if in a struct region;
2904More specifically, in a list after a struct|union keyword." 2904more specifically, in a list after a struct|union keyword"
2905 (interactive) 2905 (interactive)
2906 (save-excursion 2906 (save-excursion
2907 (let* ((state (parse-partial-sexp (point-min) (point))) 2907 (let* ((state (parse-partial-sexp (point-min) (point)))
@@ -2912,8 +2912,8 @@ More specifically, in a list after a struct|union keyword."
2912 (looking-at "\\<typedef\\>?\\s-*\\<struct\\|union\\>")))))) 2912 (looking-at "\\<typedef\\>?\\s-*\\<struct\\|union\\>"))))))
2913 2913
2914(defun verilog-in-generate-region-p () 2914(defun verilog-in-generate-region-p ()
2915 "Return true if in a generate region. 2915 "Return TRUE if in a generate region;
2916More specifically, after a generate and before an endgenerate." 2916more specifically, after a generate and before an endgenerate"
2917 (interactive) 2917 (interactive)
2918 (let ((lim (save-excursion (verilog-beg-of-defun) (point))) 2918 (let ((lim (save-excursion (verilog-beg-of-defun) (point)))
2919 (nest 1)) 2919 (nest 1))
@@ -3037,8 +3037,7 @@ With KILL-EXISTING-COMMENT, remove what was there before.
3037Insert `// case: 7 ' or `// NAME ' on this line if appropriate. 3037Insert `// case: 7 ' or `// NAME ' on this line if appropriate.
3038Insert `// case expr ' if this line ends a case block. 3038Insert `// case expr ' if this line ends a case block.
3039Insert `// ifdef FOO ' if this line ends code conditional on FOO. 3039Insert `// ifdef FOO ' if this line ends code conditional on FOO.
3040Insert `// NAME ' if this line ends a function, task, module, 3040Insert `// NAME ' if this line ends a function, task, module, primitive or interface named NAME."
3041primitive or interface named NAME."
3042 (save-excursion 3041 (save-excursion
3043 (cond 3042 (cond
3044 (; Comment close preprocessor directives 3043 (; Comment close preprocessor directives
@@ -3383,7 +3382,7 @@ primitive or interface named NAME."
3383 )))))))))) 3382 ))))))))))
3384 3383
3385(defun verilog-get-expr() 3384(defun verilog-get-expr()
3386 "Grab expression at point, e.g, case ( a | b & (c ^d))." 3385 "Grab expression at point, e.g, case ( a | b & (c ^d))"
3387 (let* ((b (progn 3386 (let* ((b (progn
3388 (verilog-forward-syntactic-ws) 3387 (verilog-forward-syntactic-ws)
3389 (skip-chars-forward " \t") 3388 (skip-chars-forward " \t")
@@ -3498,7 +3497,7 @@ Useful for creating tri's and other expanded fields."
3498 ))))) 3497 )))))
3499 3498
3500(defun verilog-strip-comments () 3499(defun verilog-strip-comments ()
3501 "Strip all comments from the Verilog code." 3500 "Strip all comments from the verilog code."
3502 (interactive) 3501 (interactive)
3503 (goto-char (point-min)) 3502 (goto-char (point-min))
3504 (while (re-search-forward "//" nil t) 3503 (while (re-search-forward "//" nil t)
@@ -3519,7 +3518,7 @@ Useful for creating tri's and other expanded fields."
3519 (delete-region bpt (point)))))) 3518 (delete-region bpt (point))))))
3520 3519
3521(defun verilog-one-line () 3520(defun verilog-one-line ()
3522 "Convert structural Verilog instances to occupy one line." 3521 "Convert structural verilog instances to occupy one line."
3523 (interactive) 3522 (interactive)
3524 (goto-char (point-min)) 3523 (goto-char (point-min))
3525 (while (re-search-forward "\\([^;]\\)[ \t]*\n[ \t]*" nil t) 3524 (while (re-search-forward "\\([^;]\\)[ \t]*\n[ \t]*" nil t)
@@ -3544,7 +3543,7 @@ For example:
3544becomes a comment for the appropriate tool. 3543becomes a comment for the appropriate tool.
3545 3544
3546The first word of the `compile-command' or `verilog-linter' 3545The first word of the `compile-command' or `verilog-linter'
3547variables is used to determine which product is being used. 3546variables are used to determine which product is being used.
3548 3547
3549See \\[verilog-surelint-off] and \\[verilog-verilint-off]." 3548See \\[verilog-surelint-off] and \\[verilog-verilint-off]."
3550 (interactive) 3549 (interactive)
@@ -3694,7 +3693,7 @@ This lets programs calling batch mode to easily extract error messages."
3694 3693
3695(defun verilog-batch-auto () 3694(defun verilog-batch-auto ()
3696 "For use with --batch, perform automatic expansions as a stand-alone tool. 3695 "For use with --batch, perform automatic expansions as a stand-alone tool.
3697This sets up the appropriate Verilog mode environment, updates automatics 3696This sets up the appropriate Verilog-Mode environment, updates automatics
3698with \\[verilog-auto] on all command-line files, and saves the buffers. 3697with \\[verilog-auto] on all command-line files, and saves the buffers.
3699For proper results, multiple filenames need to be passed on the command 3698For proper results, multiple filenames need to be passed on the command
3700line in bottom-up order." 3699line in bottom-up order."
@@ -3704,7 +3703,7 @@ line in bottom-up order."
3704 3703
3705(defun verilog-batch-delete-auto () 3704(defun verilog-batch-delete-auto ()
3706 "For use with --batch, perform automatic deletion as a stand-alone tool. 3705 "For use with --batch, perform automatic deletion as a stand-alone tool.
3707This sets up the appropriate Verilog mode environment, deletes automatics 3706This sets up the appropriate Verilog-Mode environment, deletes automatics
3708with \\[verilog-delete-auto] on all command-line files, and saves the buffers." 3707with \\[verilog-delete-auto] on all command-line files, and saves the buffers."
3709 (unless noninteractive 3708 (unless noninteractive
3710 (error "Use verilog-batch-delete-auto only with --batch")) ;; Otherwise we'd mess up buffer modes 3709 (error "Use verilog-batch-delete-auto only with --batch")) ;; Otherwise we'd mess up buffer modes
@@ -3712,7 +3711,7 @@ with \\[verilog-delete-auto] on all command-line files, and saves the buffers."
3712 3711
3713(defun verilog-batch-inject-auto () 3712(defun verilog-batch-inject-auto ()
3714 "For use with --batch, perform automatic injection as a stand-alone tool. 3713 "For use with --batch, perform automatic injection as a stand-alone tool.
3715This sets up the appropriate Verilog mode environment, injects new automatics 3714This sets up the appropriate Verilog-Mode environment, injects new automatics
3716with \\[verilog-inject-auto] on all command-line files, and saves the buffers. 3715with \\[verilog-inject-auto] on all command-line files, and saves the buffers.
3717For proper results, multiple filenames need to be passed on the command 3716For proper results, multiple filenames need to be passed on the command
3718line in bottom-up order." 3717line in bottom-up order."
@@ -3722,7 +3721,7 @@ line in bottom-up order."
3722 3721
3723(defun verilog-batch-indent () 3722(defun verilog-batch-indent ()
3724 "For use with --batch, reindent an a entire file as a stand-alone tool. 3723 "For use with --batch, reindent an a entire file as a stand-alone tool.
3725This sets up the appropriate Verilog mode environment, calls 3724This sets up the appropriate Verilog-Mode environment, calls
3726\\[verilog-indent-buffer] on all command-line files, and saves the buffers." 3725\\[verilog-indent-buffer] on all command-line files, and saves the buffers."
3727 (unless noninteractive 3726 (unless noninteractive
3728 (error "Use verilog-batch-indent only with --batch")) ;; Otherwise we'd mess up buffer modes 3727 (error "Use verilog-batch-indent only with --batch")) ;; Otherwise we'd mess up buffer modes
@@ -3765,8 +3764,8 @@ Set point to where line starts. Limit search to point LIM."
3765(defun verilog-calculate-indent () 3764(defun verilog-calculate-indent ()
3766 "Calculate the indent of the current Verilog line. 3765 "Calculate the indent of the current Verilog line.
3767Examine previous lines. Once a line is found that is definitive as to the 3766Examine previous lines. Once a line is found that is definitive as to the
3768type of the current line, return that lines' indent level and its type. 3767type of the current line, return that lines' indent level and its
3769Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)." 3768type. Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)."
3770 (save-excursion 3769 (save-excursion
3771 (let* ((starting_position (point)) 3770 (let* ((starting_position (point))
3772 (par 0) 3771 (par 0)
@@ -4018,8 +4017,8 @@ of the appropriate enclosing block."
4018 (setq nest 0)))))) 4017 (setq nest 0))))))
4019 4018
4020(defun verilog-leap-to-head () 4019(defun verilog-leap-to-head ()
4021 "Move point to the head of this block. 4020 "Move point to the head of this block; jump from end to matching begin,
4022Jump from end to matching begin, from endcase to matching case, and so on." 4021from endcase to matching case, and so on."
4023 (let ((reg nil) 4022 (let ((reg nil)
4024 snest 4023 snest
4025 (nest 1)) 4024 (nest 1))
@@ -4098,7 +4097,7 @@ Jump from end to matching begin, from endcase to matching case, and so on."
4098 4097
4099(defun verilog-continued-line () 4098(defun verilog-continued-line ()
4100 "Return true if this is a continued line. 4099 "Return true if this is a continued line.
4101Set point to where line starts." 4100Set point to where line starts"
4102 (let ((continued 't)) 4101 (let ((continued 't))
4103 (if (eq 0 (forward-line -1)) 4102 (if (eq 0 (forward-line -1))
4104 (progn 4103 (progn
@@ -4597,7 +4596,7 @@ Only look at a few lines to determine indent level."
4597 )) 4596 ))
4598 4597
4599(defun verilog-current-indent-level () 4598(defun verilog-current-indent-level ()
4600 "Return the indent-level of the current statement." 4599 "Return the indent-level the current statement has."
4601 (save-excursion 4600 (save-excursion
4602 (let (par-pos) 4601 (let (par-pos)
4603 (beginning-of-line) 4602 (beginning-of-line)
@@ -4610,7 +4609,7 @@ Only look at a few lines to determine indent level."
4610 (current-column)))) 4609 (current-column))))
4611 4610
4612(defun verilog-case-indent-level () 4611(defun verilog-case-indent-level ()
4613 "Return the indent-level of the current statement. 4612 "Return the indent-level the current statement has.
4614Do not count named blocks or case-statements." 4613Do not count named blocks or case-statements."
4615 (save-excursion 4614 (save-excursion
4616 (skip-chars-forward " \t") 4615 (skip-chars-forward " \t")
@@ -5049,15 +5048,15 @@ it displays a list of all possible completions.")
5049 "triand" "trior" "trireg" "wand" "wire" "wor" "xnor" "xor" 5048 "triand" "trior" "trireg" "wand" "wire" "wor" "xnor" "xor"
5050 ) 5049 )
5051 "*Keywords for types used when completing a word in a declaration or parmlist. 5050 "*Keywords for types used when completing a word in a declaration or parmlist.
5052\(Eg. integer, real, reg...)") 5051\(eg. integer, real, reg...)")
5053 5052
5054(defvar verilog-cpp-keywords 5053(defvar verilog-cpp-keywords
5055 '("module" "macromodule" "primitive" "timescale" "define" "ifdef" "ifndef" "else" 5054 '("module" "macromodule" "primitive" "timescale" "define" "ifdef" "ifndef" "else"
5056 "endif") 5055 "endif")
5057 "*Keywords to complete when at first word of a line in declarative scope. 5056 "*Keywords to complete when at first word of a line in declarative scope.
5058\(Eg. initial, always, begin, assign.) 5057\(eg. initial, always, begin, assign.)
5059The procedures and variables defined within the Verilog program 5058The procedures and variables defined within the Verilog program
5060will be completed at runtime and should not be added to this list.") 5059will be completed runtime and should not be added to this list.")
5061 5060
5062(defvar verilog-defun-keywords 5061(defvar verilog-defun-keywords
5063 (append 5062 (append
@@ -5069,9 +5068,9 @@ will be completed at runtime and should not be added to this list.")
5069 ) 5068 )
5070 verilog-type-keywords) 5069 verilog-type-keywords)
5071 "*Keywords to complete when at first word of a line in declarative scope. 5070 "*Keywords to complete when at first word of a line in declarative scope.
5072\(Eg. initial, always, begin, assign.) 5071\(eg. initial, always, begin, assign.)
5073The procedures and variables defined within the Verilog program 5072The procedures and variables defined within the Verilog program
5074will be completed at runtime and should not be added to this list.") 5073will be completed runtime and should not be added to this list.")
5075 5074
5076(defvar verilog-block-keywords 5075(defvar verilog-block-keywords
5077 '( 5076 '(
@@ -5080,30 +5079,30 @@ will be completed at runtime and should not be added to this list.")
5080 "for" "fork" "if" "join" "join_any" "join_none" "repeat" "return" 5079 "for" "fork" "if" "join" "join_any" "join_none" "repeat" "return"
5081 "while") 5080 "while")
5082 "*Keywords to complete when at first word of a line in behavioral scope. 5081 "*Keywords to complete when at first word of a line in behavioral scope.
5083\(Eg. begin, if, then, else, for, fork.) 5082\(eg. begin, if, then, else, for, fork.)
5084The procedures and variables defined within the Verilog program 5083The procedures and variables defined within the Verilog program
5085will be completed at runtime and should not be added to this list.") 5084will be completed runtime and should not be added to this list.")
5086 5085
5087(defvar verilog-tf-keywords 5086(defvar verilog-tf-keywords
5088 '("begin" "break" "fork" "join" "join_any" "join_none" "case" "end" "endtask" "endfunction" "if" "else" "for" "while" "repeat") 5087 '("begin" "break" "fork" "join" "join_any" "join_none" "case" "end" "endtask" "endfunction" "if" "else" "for" "while" "repeat")
5089 "*Keywords to complete when at first word of a line in a task or function. 5088 "*Keywords to complete when at first word of a line in a task or function.
5090\(Eg. begin, if, then, else, for, fork.) 5089\(eg. begin, if, then, else, for, fork.)
5091The procedures and variables defined within the Verilog program 5090The procedures and variables defined within the Verilog program
5092will be completed at runtime and should not be added to this list.") 5091will be completed runtime and should not be added to this list.")
5093 5092
5094(defvar verilog-case-keywords 5093(defvar verilog-case-keywords
5095 '("begin" "fork" "join" "join_any" "join_none" "case" "end" "endcase" "if" "else" "for" "repeat") 5094 '("begin" "fork" "join" "join_any" "join_none" "case" "end" "endcase" "if" "else" "for" "repeat")
5096 "*Keywords to complete when at first word of a line in case scope. 5095 "*Keywords to complete when at first word of a line in case scope.
5097\(Eg. begin, if, then, else, for, fork.) 5096\(eg. begin, if, then, else, for, fork.)
5098The procedures and variables defined within the Verilog program 5097The procedures and variables defined within the Verilog program
5099will be completed at runtime and should not be added to this list.") 5098will be completed runtime and should not be added to this list.")
5100 5099
5101(defvar verilog-separator-keywords 5100(defvar verilog-separator-keywords
5102 '("else" "then" "begin") 5101 '("else" "then" "begin")
5103 "*Keywords to complete when NOT standing at the first word of a statement. 5102 "*Keywords to complete when NOT standing at the first word of a statement.
5104\(Eg. else, then.) 5103\(eg. else, then.)
5105Variables and function names defined within the Verilog program 5104Variables and function names defined within the
5106will be completed at runtime and should not be added to this list.") 5105Verilog program are completed runtime and should not be added to this list.")
5107 5106
5108(defun verilog-string-diff (str1 str2) 5107(defun verilog-string-diff (str1 str2)
5109 "Return index of first letter where STR1 and STR2 differs." 5108 "Return index of first letter where STR1 and STR2 differs."
@@ -5211,11 +5210,11 @@ for matches of `str' and adding the occurrence tp `all' through point END."
5211 "Function passed to `completing-read', `try-completion' or `all-completions'. 5210 "Function passed to `completing-read', `try-completion' or `all-completions'.
5212Called to get completion on VERILOG-STR. If VERILOG-PRED is non-nil, it 5211Called to get completion on VERILOG-STR. If VERILOG-PRED is non-nil, it
5213must be a function to be called for every match to check if this should 5212must be a function to be called for every match to check if this should
5214really be a match. If VERILOG-FLAG is t, the function returns a list of 5213really be a match. If VERILOG-FLAG is t, the function returns a list of all
5215all possible completions. If VERILOG-FLAG is nil it returns a string, 5214possible completions. If VERILOG-FLAG is nil it returns a string, the
5216the longest possible completion, or t if VERILOG-STR is an exact match. 5215longest possible completion, or t if STR is an exact match. If VERILOG-FLAG
5217If VERILOG-FLAG is 'lambda, the function returns t if VERILOG-STR is an 5216is 'lambda, the function returns t if STR is an exact match, nil
5218exact match, nil otherwise." 5217otherwise."
5219 (save-excursion 5218 (save-excursion
5220 (let ((verilog-all nil)) 5219 (let ((verilog-all nil))
5221 ;; Set buffer to use for searching labels. This should be set 5220 ;; Set buffer to use for searching labels. This should be set
@@ -5722,8 +5721,8 @@ Bound search by LIMIT. Adapted from
5722 (nth 3 sigs)) 5721 (nth 3 sigs))
5723 5722
5724(defun verilog-signals-not-in (in-list not-list) 5723(defun verilog-signals-not-in (in-list not-list)
5725 "Return list of signals in IN-LIST that aren't also in NOT-LIST. 5724 "Return list of signals in IN-LIST that aren't also in NOT-LIST,
5726Also remove any duplicates in IN-LIST. 5725and also remove any duplicates in IN-LIST.
5727Signals must be in standard (base vector) form." 5726Signals must be in standard (base vector) form."
5728 (let (out-list) 5727 (let (out-list)
5729 (while in-list 5728 (while in-list
@@ -6114,7 +6113,7 @@ Return a array of [outputs inouts inputs wire reg assign const]."
6114 6113
6115 6114
6116(defun verilog-read-sub-decls-sig (submodi comment port sig vec multidim) 6115(defun verilog-read-sub-decls-sig (submodi comment port sig vec multidim)
6117 "For `verilog-read-sub-decls-line', add a signal." 6116 "For verilog-read-sub-decls-line, add a signal."
6118 (let (portdata) 6117 (let (portdata)
6119 (when sig 6118 (when sig
6120 (setq port (verilog-symbol-detick-denumber port)) 6119 (setq port (verilog-symbol-detick-denumber port))
@@ -6146,7 +6145,7 @@ Return a array of [outputs inouts inputs wire reg assign const]."
6146 ))))) 6145 )))))
6147 6146
6148(defun verilog-read-sub-decls-line (submodi comment) 6147(defun verilog-read-sub-decls-line (submodi comment)
6149 "For `verilog-read-sub-decls', read lines of port defs until none match anymore. 6148 "For read-sub-decls, read lines of port defs until none match anymore.
6150Return the list of signals found, using submodi to look up each port." 6149Return the list of signals found, using submodi to look up each port."
6151 (let (done port sig vec multidim) 6150 (let (done port sig vec multidim)
6152 (save-excursion 6151 (save-excursion
@@ -6267,7 +6266,7 @@ Outputs comments above subcell signals, for example:
6267 (verilog-signals-combine-bus (nreverse sigs-in)))))) 6266 (verilog-signals-combine-bus (nreverse sigs-in))))))
6268 6267
6269(defun verilog-read-inst-pins () 6268(defun verilog-read-inst-pins ()
6270 "Return an array of [ pins ] for the current instantiation at point. 6269 "Return a array of [ pins ] for the current instantiation at point.
6271For example if declare A A (.B(SIG)) then B will be included in the list." 6270For example if declare A A (.B(SIG)) then B will be included in the list."
6272 (save-excursion 6271 (save-excursion
6273 (let ((end-mod-point (point)) ;; presume at /*AUTOINST*/ point 6272 (let ((end-mod-point (point)) ;; presume at /*AUTOINST*/ point
@@ -6282,7 +6281,7 @@ For example if declare A A (.B(SIG)) then B will be included in the list."
6282 (vector pins)))) 6281 (vector pins))))
6283 6282
6284(defun verilog-read-arg-pins () 6283(defun verilog-read-arg-pins ()
6285 "Return an array of [ pins ] for the current argument declaration at point." 6284 "Return a array of [ pins ] for the current argument declaration at point."
6286 (save-excursion 6285 (save-excursion
6287 (let ((end-mod-point (point)) ;; presume at /*AUTOARG*/ point 6286 (let ((end-mod-point (point)) ;; presume at /*AUTOARG*/ point
6288 pins pin) 6287 pins pin)
@@ -6511,7 +6510,7 @@ IGNORE-NEXT is true to ignore next token, fake from inside case statement."
6511(defun verilog-read-auto-template (module) 6510(defun verilog-read-auto-template (module)
6512 "Look for a auto_template for the instantiation of the given MODULE. 6511 "Look for a auto_template for the instantiation of the given MODULE.
6513If found returns the signal name connections. Return REGEXP and 6512If found returns the signal name connections. Return REGEXP and
6514list of ( (signal_name connection_name)... )." 6513list of ( (signal_name connection_name)... )"
6515 (save-excursion 6514 (save-excursion
6516 ;; Find beginning 6515 ;; Find beginning
6517 (let ((tpl-regexp "\\([0-9]+\\)") 6516 (let ((tpl-regexp "\\([0-9]+\\)")
@@ -6727,7 +6726,7 @@ foo.v (a include):
6727(defun verilog-read-signals (&optional start end) 6726(defun verilog-read-signals (&optional start end)
6728 "Return a simple list of all possible signals in the file. 6727 "Return a simple list of all possible signals in the file.
6729Bounded by optional region from START to END. Overly aggressive but fast. 6728Bounded by optional region from START to END. Overly aggressive but fast.
6730Some macros and such are also found and included. For dinotrace.el." 6729Some macros and such are also found and included. For dinotrace.el"
6731 (let (sigs-all keywd) 6730 (let (sigs-all keywd)
6732 (progn;save-excursion 6731 (progn;save-excursion
6733 (goto-char (or start (point-min))) 6732 (goto-char (or start (point-min)))
@@ -6822,7 +6821,7 @@ Some macros and such are also found and included. For dinotrace.el."
6822;;(verilog-getopt (list "+libext+.a+.b" "+incdir+foodir" "+define+a+aval" "-f" "otherf" "-v" "library" "-y" "dir")) 6821;;(verilog-getopt (list "+libext+.a+.b" "+incdir+foodir" "+define+a+aval" "-f" "otherf" "-v" "library" "-y" "dir"))
6823 6822
6824(defun verilog-getopt-file (filename) 6823(defun verilog-getopt-file (filename)
6825 "Read Verilog options from the specified FILENAME." 6824 "Read verilog options from the specified FILENAME."
6826 (save-excursion 6825 (save-excursion
6827 (let ((fns (verilog-library-filenames filename (buffer-file-name))) 6826 (let ((fns (verilog-library-filenames filename (buffer-file-name)))
6828 (orig-buffer (current-buffer)) 6827 (orig-buffer (current-buffer))
@@ -6859,7 +6858,7 @@ Some macros and such are also found and included. For dinotrace.el."
6859 6858
6860(defun verilog-add-list-unique (varref object) 6859(defun verilog-add-list-unique (varref object)
6861 "Append to VARREF list the given OBJECT, 6860 "Append to VARREF list the given OBJECT,
6862unless it is already a member of the variable's list." 6861unless it is already a member of the variable's list"
6863 (unless (member object (symbol-value varref)) 6862 (unless (member object (symbol-value varref))
6864 (set varref (append (symbol-value varref) (list object)))) 6863 (set varref (append (symbol-value varref) (list object))))
6865 varref) 6864 varref)
@@ -6895,7 +6894,7 @@ Allows version control to check out the file if need be."
6895 (string-match "^[0-9 \t]+'s?[hdxbo][0-9a-fA-F_xz? \t]*$" symbol))) 6894 (string-match "^[0-9 \t]+'s?[hdxbo][0-9a-fA-F_xz? \t]*$" symbol)))
6896 6895
6897(defun verilog-symbol-detick (symbol wing-it) 6896(defun verilog-symbol-detick (symbol wing-it)
6898 "Return an expanded SYMBOL name without any defines. 6897 "Return a expanded SYMBOL name without any defines.
6899If the variable vh-{symbol} is defined, return that value. 6898If the variable vh-{symbol} is defined, return that value.
6900If undefined, and WING-IT, return just SYMBOL without the tick, else nil." 6899If undefined, and WING-IT, return just SYMBOL without the tick, else nil."
6901 (while (and symbol (string-match "^`" symbol)) 6900 (while (and symbol (string-match "^`" symbol))
@@ -6930,7 +6929,7 @@ If undefined, and WING-IT, return just SYMBOL without the tick, else nil."
6930 symbol)) 6929 symbol))
6931 6930
6932(defun verilog-symbol-detick-text (text) 6931(defun verilog-symbol-detick-text (text)
6933 "Return TEXT without any known defines. 6932 "Return TEXT with any without any known defines.
6934If the variable vh-{symbol} is defined, substitute that value." 6933If the variable vh-{symbol} is defined, substitute that value."
6935 (let ((ok t) symbol val) 6934 (let ((ok t) symbol val)
6936 (while (and ok (string-match "`\\([a-zA-Z0-9_]+\\)" text)) 6935 (while (and ok (string-match "`\\([a-zA-Z0-9_]+\\)" text))
@@ -7035,10 +7034,10 @@ Buffer-local.")
7035 7034
7036(defvar verilog-modi-cache-preserve-tick nil 7035(defvar verilog-modi-cache-preserve-tick nil
7037 "Modification tick after which the cache is still considered valid. 7036 "Modification tick after which the cache is still considered valid.
7038Use `verilog-preserve-cache' to set it.") 7037Use verilog-preserve-cache's to set")
7039(defvar verilog-modi-cache-preserve-buffer nil 7038(defvar verilog-modi-cache-preserve-buffer nil
7040 "Modification tick after which the cache is still considered valid. 7039 "Modification tick after which the cache is still considered valid.
7041Use `verilog-preserve-cache' to set it.") 7040Use verilog-preserve-cache's to set")
7042 7041
7043(defun verilog-modi-current () 7042(defun verilog-modi-current ()
7044 "Return the modi structure for the module currently at point." 7043 "Return the modi structure for the module currently at point."
@@ -7102,7 +7101,7 @@ Return modi if successful, else print message unless IGNORE-ERROR is true."
7102 (aref modi 2)) 7101 (aref modi 2))
7103 7102
7104(defun verilog-modi-filename (modi) 7103(defun verilog-modi-filename (modi)
7105 "Filename of MODI, or name of buffer if it's never been saved." 7104 "Filename of MODI, or name of buffer if its never been saved."
7106 (if (bufferp (verilog-modi-file-or-buffer modi)) 7105 (if (bufferp (verilog-modi-file-or-buffer modi))
7107 (or (buffer-file-name (verilog-modi-file-or-buffer modi)) 7106 (or (buffer-file-name (verilog-modi-file-or-buffer modi))
7108 (buffer-name (verilog-modi-file-or-buffer modi))) 7107 (buffer-name (verilog-modi-file-or-buffer modi)))
@@ -7114,7 +7113,7 @@ Return modi if successful, else print message unless IGNORE-ERROR is true."
7114 (set-buffer (if (bufferp (verilog-modi-file-or-buffer modi)) 7113 (set-buffer (if (bufferp (verilog-modi-file-or-buffer modi))
7115 (verilog-modi-file-or-buffer modi) 7114 (verilog-modi-file-or-buffer modi)
7116 (find-file-noselect (verilog-modi-file-or-buffer modi)))) 7115 (find-file-noselect (verilog-modi-file-or-buffer modi))))
7117 (or (equal major-mode `verilog-mode) ;; Put into Verilog mode to get syntax 7116 (or (equal major-mode `verilog-mode) ;; Put into verilog mode to get syntax
7118 (verilog-mode)) 7117 (verilog-mode))
7119 (goto-char (verilog-modi-point modi))) 7118 (goto-char (verilog-modi-point modi)))
7120 7119
@@ -7413,8 +7412,8 @@ This repairs those mis-inserted by a AUTOARG."
7413 (forward-line 1)))) 7412 (forward-line 1))))
7414 7413
7415(defun verilog-forward-close-paren () 7414(defun verilog-forward-close-paren ()
7416 "Find the close parenthesis that match the current point. 7415 "Find the close parenthesis that match the current point,
7417Ignore other close parenthesis with matching open parens." 7416ignore other close parenthesis with matching open parens"
7418 (let ((parens 1)) 7417 (let ((parens 1))
7419 (while (> parens 0) 7418 (while (> parens 0)
7420 (unless (verilog-re-search-forward-quick "[()]" nil t) 7419 (unless (verilog-re-search-forward-quick "[()]" nil t)
@@ -7425,8 +7424,8 @@ Ignore other close parenthesis with matching open parens."
7425 (setq parens (1- parens))))))) 7424 (setq parens (1- parens)))))))
7426 7425
7427(defun verilog-backward-open-paren () 7426(defun verilog-backward-open-paren ()
7428 "Find the open parenthesis that match the current point. 7427 "Find the open parenthesis that match the current point,
7429Ignore other open parenthesis with matching close parens." 7428ignore other open parenthesis with matching close parens"
7430 (let ((parens 1)) 7429 (let ((parens 1))
7431 (while (> parens 0) 7430 (while (> parens 0)
7432 (unless (verilog-re-search-backward-quick "[()]" nil t) 7431 (unless (verilog-re-search-backward-quick "[()]" nil t)
@@ -7437,8 +7436,8 @@ Ignore other open parenthesis with matching close parens."
7437 (setq parens (1- parens))))))) 7436 (setq parens (1- parens)))))))
7438 7437
7439(defun verilog-backward-open-bracket () 7438(defun verilog-backward-open-bracket ()
7440 "Find the open bracket that match the current point. 7439 "Find the open bracket that match the current point,
7441Ignore other open bracket with matching close bracket." 7440ignore other open bracket with matching close bracket"
7442 (let ((parens 1)) 7441 (let ((parens 1))
7443 (while (> parens 0) 7442 (while (> parens 0)
7444 (unless (verilog-re-search-backward-quick "[][]" nil t) 7443 (unless (verilog-re-search-backward-quick "[][]" nil t)
@@ -7553,8 +7552,8 @@ called before and after this function, respectively."
7553Any always @ blocks with sensitivity lists that match computed lists will 7552Any always @ blocks with sensitivity lists that match computed lists will
7554be replaced with /*AS*/ comments. 7553be replaced with /*AS*/ comments.
7555 7554
7556Any cells will get /*AUTOINST*/ added to the end of the pin list. 7555Any cells will get /*AUTOINST*/ added to the end of the pin list. Pins with
7557Pins with have identical names will be deleted. 7556have identical names will be deleted.
7558 7557
7559Argument lists will not be deleted, /*AUTOARG*/ will only be inserted to 7558Argument lists will not be deleted, /*AUTOARG*/ will only be inserted to
7560support adding new ports. You may wish to delete older ports yourself. 7559support adding new ports. You may wish to delete older ports yourself.
@@ -7768,9 +7767,9 @@ Typing \\[verilog-auto] will make this into:
7768 7767
7769Any ports declared between the ( and /*AUTOARG*/ are presumed to be 7768Any ports declared between the ( and /*AUTOARG*/ are presumed to be
7770predeclared and are not redeclared by AUTOARG. AUTOARG will make a 7769predeclared and are not redeclared by AUTOARG. AUTOARG will make a
7771conservative guess on adding a comma for the first signal, if you have 7770conservative guess on adding a comma for the first signal, if you have any
7772any ifdefs or complicated expressions before the AUTOARG you will need 7771ifdefs or complicated expressions before the AUTOARG you will need to
7773to choose the comma yourself. 7772choose the comma yourself.
7774 7773
7775Avoid declaring ports manually, as it makes code harder to maintain." 7774Avoid declaring ports manually, as it makes code harder to maintain."
7776 (save-excursion 7775 (save-excursion
@@ -7900,7 +7899,7 @@ If FOR-STAR add comment it is a .* expansion."
7900 "Expand SystemVerilog .* pins, as part of \\[verilog-auto]. 7899 "Expand SystemVerilog .* pins, as part of \\[verilog-auto].
7901 7900
7902If `verilog-auto-star-expand' is set, .* pins are treated if they were 7901If `verilog-auto-star-expand' is set, .* pins are treated if they were
7903AUTOINST statements, otherwise they are ignored. For safety, Verilog mode 7902AUTOINST statements, otherwise they are ignored. For safety, Verilog-Mode
7904will also ignore any .* that are not last in your pin list (this prevents 7903will also ignore any .* that are not last in your pin list (this prevents
7905it from deleting pins following the .* when it expands the AUTOINST.) 7904it from deleting pins following the .* when it expands the AUTOINST.)
7906 7905
@@ -7936,7 +7935,7 @@ Limitations:
7936 7935
7937 Typedefs must match `verilog-typedef-regexp', which is disabled by default. 7936 Typedefs must match `verilog-typedef-regexp', which is disabled by default.
7938 7937
7939 SystemVerilog multidimensional input/output has only experimental support. 7938 SystemVerilog multidimmensional input/output has only experimental support.
7940 7939
7941For example, first take the submodule inst.v: 7940For example, first take the submodule inst.v:
7942 7941
@@ -7971,9 +7970,9 @@ Where the list of inputs and outputs came from the inst module.
7971Exceptions: 7970Exceptions:
7972 7971
7973 Unless you are instantiating a module multiple times, or the module is 7972 Unless you are instantiating a module multiple times, or the module is
7974 something trivial like an adder, DO NOT CHANGE SIGNAL NAMES ACROSS HIERARCHY. 7973 something trivial like a adder, DO NOT CHANGE SIGNAL NAMES ACROSS HIERARCHY.
7975 It just makes for unmaintainable code. To sanitize signal names, try 7974 It just makes for unmaintainable code. To sanitize signal names, try
7976 vrename from http://www.veripool.com. 7975 vrename from http://www.veripool.com
7977 7976
7978 When you need to violate this suggestion there are two ways to list 7977 When you need to violate this suggestion there are two ways to list
7979 exceptions, placing them before the AUTOINST, or using templates. 7978 exceptions, placing them before the AUTOINST, or using templates.
@@ -8002,10 +8001,10 @@ Templates:
8002 ); 8001 );
8003 */ 8002 */
8004 8003
8005 Templates go ABOVE the instantiation(s). When an instantiation is 8004 Templates go ABOVE the instantiation(s). When a instantiation is
8006 expanded `verilog-mode' simply searches up for the closest template. 8005 expanded `verilog-mode' simply searches up for the closest template.
8007 Thus you can have multiple templates for the same module, just alternate 8006 Thus you can have multiple templates for the same module, just alternate
8008 between the template for an instantiation and the instantiation itself. 8007 between the template for a instantiation and the instantiation itself.
8009 8008
8010 The module name must be the same as the name of the module in the 8009 The module name must be the same as the name of the module in the
8011 instantiation name, and the code \"AUTO_TEMPLATE\" must be in these exact 8010 instantiation name, and the code \"AUTO_TEMPLATE\" must be in these exact
@@ -8111,7 +8110,7 @@ Regexp Templates:
8111 8110
8112 .pci_req\\([0-9]+\\)_l (pci_req_jtag_[\\1]), 8111 .pci_req\\([0-9]+\\)_l (pci_req_jtag_[\\1]),
8113 8112
8114 will apply an Emacs style regular expression search for any port beginning 8113 will apply a Emacs style regular expression search for any port beginning
8115 in pci_req followed by numbers and ending in _l and connecting that to 8114 in pci_req followed by numbers and ending in _l and connecting that to
8116 the pci_req_jtag_[] net, with the bus subscript coming from what matches 8115 the pci_req_jtag_[] net, with the bus subscript coming from what matches
8117 inside the first set of \\( \\). Thus pci_req2_l becomes pci_req_jtag_[2]. 8116 inside the first set of \\( \\). Thus pci_req2_l becomes pci_req_jtag_[2].
@@ -8140,13 +8139,13 @@ Lisp Templates:
8140 a leading backslash (\\\"). There are special variables defined that are 8139 a leading backslash (\\\"). There are special variables defined that are
8141 useful in these Lisp functions: 8140 useful in these Lisp functions:
8142 8141
8143 vl-name Name portion of the input/output port. 8142 vl-name Name portion of the input/output port
8144 vl-bits Bus bits portion of the input/output port ('[2:0]'). 8143 vl-bits Bus bits portion of the input/output port ('[2:0]')
8145 vl-width Width of the input/output port ('3' for [2:0]). 8144 vl-width Width of the input/output port ('3' for [2:0])
8146 May be a (...) expression if bits isn't a constant. 8145 May be a (...) expression if bits isn't a constant.
8147 vl-dir Direction of the pin input/output/inout. 8146 vl-dir Direction of the pin input/output/inout.
8148 vl-cell-type Module name/type of the cell ('psm_mas'). 8147 vl-cell-type Module name/type of the cell ('psm_mas')
8149 vl-cell-name Instance name of the cell ('ms2m'). 8148 vl-cell-name Instance name of the cell ('ms2m')
8150 8149
8151 Normal Lisp variables may be used in expressions. See 8150 Normal Lisp variables may be used in expressions. See
8152 `verilog-read-defines' which can set vh-{definename} variables for use 8151 `verilog-read-defines' which can set vh-{definename} variables for use
@@ -8159,7 +8158,7 @@ Lisp Templates:
8159 functions to be defined or variables to be changed between instantiations. 8158 functions to be defined or variables to be changed between instantiations.
8160 8159
8161 Note that when using lisp expressions errors may occur when @ is not a 8160 Note that when using lisp expressions errors may occur when @ is not a
8162 number; you may need to use the standard Emacs Lisp functions 8161 number, you may need to use the standard Emacs Lisp functions
8163 `number-to-string' and `string-to-number'. 8162 `number-to-string' and `string-to-number'.
8164 8163
8165 After the evaluation is completed, @ substitution and [] substitution 8164 After the evaluation is completed, @ substitution and [] substitution
@@ -8464,9 +8463,9 @@ Limitations:
8464 This does NOT work on memories or SystemVerilog .name connections, 8463 This does NOT work on memories or SystemVerilog .name connections,
8465 declare those yourself. 8464 declare those yourself.
8466 8465
8467 Verilog mode will add \"Couldn't Merge\" comments to signals it cannot 8466 Verilog-mode will add \"Couldn't Merge\" comments to signals it cannot
8468 determine how to bus together. This occurs when you have ports with 8467 determine how to bus together. This occurs when you have ports with
8469 non-numeric or non-sequential bus subscripts. If Verilog mode 8468 non-numeric or non-sequential bus subscripts. If Verilog-Mode
8470 mis-guessed, you'll have to declare them yourself. 8469 mis-guessed, you'll have to declare them yourself.
8471 8470
8472An example (see `verilog-auto-inst' for what else is going on here): 8471An example (see `verilog-auto-inst' for what else is going on here):
@@ -8762,8 +8761,8 @@ Typing \\[verilog-auto] will make this into:
8762 "Expand AUTOINOUTMODULE statements, as part of \\[verilog-auto]. 8761 "Expand AUTOINOUTMODULE statements, as part of \\[verilog-auto].
8763Take input/output/inout statements from the specified module and insert 8762Take input/output/inout statements from the specified module and insert
8764into the current module. This is useful for making null templates and 8763into the current module. This is useful for making null templates and
8765shell modules which need to have identical I/O with another module. 8764shell modules which need to have identical I/O with another module. Any
8766Any I/O which are already defined in this module will not be redefined. 8765I/O which are already defined in this module will not be redefined.
8767 8766
8768Limitations: 8767Limitations:
8769 If placed inside the parenthesis of a module declaration, it creates 8768 If placed inside the parenthesis of a module declaration, it creates
@@ -9171,7 +9170,7 @@ Typing \\[verilog-auto] will make this into:
9171 (verilog-insert-indent "// End of automatics\n"))))) 9170 (verilog-insert-indent "// End of automatics\n")))))
9172 9171
9173(defun verilog-enum-ascii (signm elim-regexp) 9172(defun verilog-enum-ascii (signm elim-regexp)
9174 "Convert an enum name SIGNM to an ascii string for insertion. 9173 "Convert a enum name SIGNM to a ascii string for insertion.
9175Remove user provided prefix ELIM-REGEXP." 9174Remove user provided prefix ELIM-REGEXP."
9176 (or elim-regexp (setq elim-regexp "_ DONT MATCH IT_")) 9175 (or elim-regexp (setq elim-regexp "_ DONT MATCH IT_"))
9177 (let ((case-fold-search t)) 9176 (let ((case-fold-search t))
@@ -9654,7 +9653,7 @@ for sensitivity list."
9654 > (- verilog-indent-level-behavioral) "endgenerate" \n > ) 9653 > (- verilog-indent-level-behavioral) "endgenerate" \n > )
9655 9654
9656(define-skeleton verilog-sk-begin 9655(define-skeleton verilog-sk-begin
9657 "Insert begin end block. Uses the minibuffer to prompt for name." 9656 "Insert begin end block. Uses the minibuffer to prompt for name"
9658 () 9657 ()
9659 > "begin" '(verilog-sk-prompt-name) \n 9658 > "begin" '(verilog-sk-prompt-name) \n
9660 > _ \n 9659 > _ \n
@@ -9662,7 +9661,7 @@ for sensitivity list."
9662) 9661)
9663 9662
9664(define-skeleton verilog-sk-fork 9663(define-skeleton verilog-sk-fork
9665 "Insert a fork join block." 9664 "Insert an fork join block."
9666 () 9665 ()
9667 > "fork\n" 9666 > "fork\n"
9668 > "begin" \n 9667 > "begin" \n
@@ -9713,7 +9712,7 @@ and the case items."
9713 > "end" (progn (electric-verilog-terminate-line) nil)) 9712 > "end" (progn (electric-verilog-terminate-line) nil))
9714 9713
9715(define-skeleton verilog-sk-datadef 9714(define-skeleton verilog-sk-datadef
9716 "Common routine to get data definition." 9715 "Common routine to get data definition"
9717 () 9716 ()
9718 '(verilog-sk-prompt-width) | -1 ("name (RET to end):" str ", ") -2 ";" \n) 9717 '(verilog-sk-prompt-width) | -1 ("name (RET to end):" str ", ") -2 ";" \n)
9719 9718
@@ -9907,7 +9906,7 @@ Clicking on the middle-mouse button loads them in a buffer (as in dired)."
9907 9906
9908 9907
9909(defun verilog-colorize-include-files-buffer () 9908(defun verilog-colorize-include-files-buffer ()
9910 "Colorize an include file." 9909 "Colorize a include file."
9911 (interactive) 9910 (interactive)
9912 ;; delete overlays 9911 ;; delete overlays
9913 (let ((overlays (overlays-in (point-min) (point-max)))) 9912 (let ((overlays (overlays-in (point-min) (point-max))))
@@ -9920,14 +9919,14 @@ Clicking on the middle-mouse button loads them in a buffer (as in dired)."
9920 ;; remake overlays 9919 ;; remake overlays
9921 (verilog-colorize-include-files (point-min) (point-max) nil)) 9920 (verilog-colorize-include-files (point-min) (point-max) nil))
9922 9921
9923;; ffap-at-mouse isn't useful for Verilog mode. It uses library paths. 9922;; ffap-at-mouse isn't useful for verilog mode. It uses library paths.
9924;; so define this function to do more or less the same as ffap-at-mouse 9923;; so define this function to do more or less the same as ffap-at-mouse
9925;; but first resolve filename... 9924;; but first resolve filename...
9926(defun verilog-load-file-at-mouse (event) 9925(defun verilog-load-file-at-mouse (event)
9927 "Load file under button 2 click's EVENT. 9926 "Load file under button 2 click's EVENT.
9928Files are checked based on `verilog-library-directories'." 9927Files are checked based on `verilog-library-directories'."
9929 (interactive "@e") 9928 (interactive "@e")
9930 (save-excursion ;; implement a Verilog specific ffap-at-mouse 9929 (save-excursion ;; implement a verilog specific ffap-at-mouse
9931 (mouse-set-point event) 9930 (mouse-set-point event)
9932 (beginning-of-line) 9931 (beginning-of-line)
9933 (if (looking-at verilog-include-file-regexp) 9932 (if (looking-at verilog-include-file-regexp)
@@ -9942,14 +9941,14 @@ Files are checked based on `verilog-library-directories'."
9942 "File '%s' isn't readable, use shift-mouse2 to paste in this field" 9941 "File '%s' isn't readable, use shift-mouse2 to paste in this field"
9943 (match-string 1))))))) 9942 (match-string 1)))))))
9944 9943
9945;; ffap isn't useable for Verilog mode. It uses library paths. 9944;; ffap isn't useable for verilog mode. It uses library paths.
9946;; so define this function to do more or less the same as ffap 9945;; so define this function to do more or less the same as ffap
9947;; but first resolve filename... 9946;; but first resolve filename...
9948(defun verilog-load-file-at-point () 9947(defun verilog-load-file-at-point ()
9949 "Load file under point. 9948 "Load file under point.
9950Files are checked based on `verilog-library-directories'." 9949Files are checked based on `verilog-library-directories'."
9951 (interactive) 9950 (interactive)
9952 (save-excursion ;; implement a Verilog specific ffap 9951 (save-excursion ;; implement a verilog specific ffap
9953 (beginning-of-line) 9952 (beginning-of-line)
9954 (if (looking-at verilog-include-file-regexp) 9953 (if (looking-at verilog-include-file-regexp)
9955 (if (and 9954 (if (and
@@ -10045,7 +10044,7 @@ You may also want to look at the Verilog-Mode FAQ, see
10045http://www.veripool.com/verilog-mode-faq.html. 10044http://www.veripool.com/verilog-mode-faq.html.
10046 10045
10047To reproduce the bug, start a fresh Emacs via " invocation-name " 10046To reproduce the bug, start a fresh Emacs via " invocation-name "
10048-no-init-file -no-site-file'. In a new buffer, in Verilog mode, type 10047-no-init-file -no-site-file'. In a new buffer, in verilog mode, type
10049the code included below. 10048the code included below.
10050 10049
10051Given those lines, I expected [[Fill in here]] to happen; 10050Given those lines, I expected [[Fill in here]] to happen;