 To call this from the command line, see \\[verilog-batch-indent]."
   (interactive)
   (verilog-mode)
+  (verilog-auto-reeval-locals)
   (indent-region (point-min) (point-max) nil))
 
 (defun verilog-insert-block ()

		((and v2kargs-ok
		      (eq paren 1)
		      (not rvalue)
		      (looking-at "\\s-*\\(\\.\\(\\s-*[a-zA-Z`_$][a-zA-Z0-9`_$]*\\)\\|\\)\\s-*[a-zA-Z`_$][a-zA-Z0-9`_$]*"))
		 (when (match-end 2) (goto-char (match-end 2)))
		 (setq vec nil          enum nil       rvalue nil  signed nil
		       typedefed keywd  multidim nil   ptype nil   modport (match-string 2)

                  (match-end 11)  ; of verilog-end-block-ordered-re
                  ;;(goto-char there)
                  (let ((nest 0)
                        (reg "\\<\\(\\(class\\)\\|\\(endclass\\)\\|\\(package\\|primitive\\|\\(macro\\)?module\\)\\)\\>")
                        string)
                    (save-excursion
                      (catch 'skip
                        (while (verilog-re-search-backward reg nil 'move)
                          (cond
                           ((match-end 4)       ; endclass
                            (ding 't)
                            (setq string "unmatched endclass")
                            (throw 'skip 1))

                           ((match-end 3)       ; endclass
                            (setq nest (1+ nest)))

                           ((match-end 2) ; class
                            (setq nest (1- nest))
                            (if (< nest 0)
                                (progn
