 
 
 (define-skeleton verilog-sk-case
-    "Build skeleton case statement, prompting for the selector expression,
+  "Build skeleton case statement, prompting for the selector expression,
 and the case items."
   "[selector expression]: "
   > "case (" str ") " \n

	 (verilog-modi-cache-current-max (point-min)) ; IE it's invalid
	 verilog-modi-cache-current)
     (unwind-protect
          ;; Disable change hooks for speed
          ;; This let can't be part of above let; must restore
          ;; after-change-functions before font-lock resumes
          (verilog-save-no-change-functions
           (verilog-save-scan-cache
            (save-excursion
              ;; Wipe cache; otherwise if we AUTOed a block above this one,
              ;; we'll misremember we have generated IOs, confusing AUTOOUTPUT
              (setq verilog-modi-cache-list nil)
              ;; Local state
              (setq verilog-auto-template-hits nil)
              ;; If we're not in verilog-mode, change syntax table so parsing works right
              (unless (eq major-mode `verilog-mode) (verilog-mode))
              ;; Allow user to customize
              (verilog-run-hooks 'verilog-before-auto-hook)
              ;; Try to save the user from needing to revert-file to reread file local-variables
              (verilog-auto-reeval-locals)
              (verilog-read-auto-lisp-present)
              (verilog-read-auto-lisp (point-min) (point-max))
              (verilog-getopt-flags)
              ;; From here on out, we can cache anything we read from disk
              (verilog-preserve-dir-cache
               ;; These two may seem obvious to do always, but on large includes it can be way too slow
               (when verilog-auto-read-includes
                 (verilog-read-includes)
                 (verilog-read-defines nil nil t))
               ;; Setup variables due to SystemVerilog expansion
               (verilog-auto-re-search-do "/\\*AUTOLOGIC\\*/" 'verilog-auto-logic-setup)
               ;; This particular ordering is important
               ;; INST: Lower modules correct, no internal dependencies, FIRST
               (verilog-preserve-modi-cache
                ;; Clear existing autos else we'll be screwed by existing ones
                (verilog-delete-auto)
                ;; Injection if appropriate
                (when inject
                  (verilog-inject-inst)
                  (verilog-inject-sense)
                  (verilog-inject-arg))
                ;;
                ;; Do user inserts first, so their code can insert AUTOs
                (verilog-auto-re-search-do "/\\*AUTOINSERTLISP(.*?)\\*/"
                                           'verilog-auto-insert-lisp)
                ;; Expand instances before need the signals the instances input/output
                (verilog-auto-re-search-do "/\\*AUTOINSTPARAM\\*/" 'verilog-auto-inst-param)
                (verilog-auto-re-search-do "/\\*AUTOINST\\*/" 'verilog-auto-inst)
                (verilog-auto-re-search-do "\\.\\*" 'verilog-auto-star)
                ;; Doesn't matter when done, but combine it with a common changer
                (verilog-auto-re-search-do "/\\*\\(AUTOSENSE\\|AS\\)\\*/" 'verilog-auto-sense)
                (verilog-auto-re-search-do "/\\*AUTORESET\\*/" 'verilog-auto-reset)
                ;; Must be done before autoin/out as creates a reg
                (verilog-auto-re-search-do "/\\*AUTOASCIIENUM(.*?)\\*/" 'verilog-auto-ascii-enum)
                ;;
                ;; first in/outs from other files
                (verilog-auto-re-search-do "/\\*AUTOINOUTMODPORT(.*?)\\*/" 'verilog-auto-inout-modport)
                (verilog-auto-re-search-do "/\\*AUTOINOUTMODULE(.*?)\\*/" 'verilog-auto-inout-module)
                (verilog-auto-re-search-do "/\\*AUTOINOUTCOMP(.*?)\\*/" 'verilog-auto-inout-comp)
                (verilog-auto-re-search-do "/\\*AUTOINOUTIN(.*?)\\*/" 'verilog-auto-inout-in)
                (verilog-auto-re-search-do "/\\*AUTOINOUTPARAM(.*?)\\*/" 'verilog-auto-inout-param)
                ;; next in/outs which need previous sucked inputs first
                (verilog-auto-re-search-do "/\\*AUTOOUTPUT\\((.*?)\\)?\\*/" 'verilog-auto-output)
                (verilog-auto-re-search-do "/\\*AUTOINPUT\\((.*?)\\)?\\*/" 'verilog-auto-input)
                (verilog-auto-re-search-do "/\\*AUTOINOUT\\((.*?)\\)?\\*/" 'verilog-auto-inout)
                ;; Then tie off those in/outs
                (verilog-auto-re-search-do "/\\*AUTOTIEOFF\\*/" 'verilog-auto-tieoff)
                ;; These can be anywhere after AUTOINSERTLISP
                (verilog-auto-re-search-do "/\\*AUTOUNDEF\\((.*?)\\)?\\*/" 'verilog-auto-undef)
                ;; Wires/regs must be after inputs/outputs
                (verilog-auto-re-search-do "/\\*AUTOASSIGNMODPORT(.*?)\\*/" 'verilog-auto-assign-modport)
                (verilog-auto-re-search-do "/\\*AUTOLOGIC\\*/" 'verilog-auto-logic)
                (verilog-auto-re-search-do "/\\*AUTOWIRE\\*/" 'verilog-auto-wire)
                (verilog-auto-re-search-do "/\\*AUTOREG\\*/" 'verilog-auto-reg)
                (verilog-auto-re-search-do "/\\*AUTOREGINPUT\\*/" 'verilog-auto-reg-input)
                ;; outputevery needs AUTOOUTPUTs done first
                (verilog-auto-re-search-do "/\\*AUTOOUTPUTEVERY\\((.*?)\\)?\\*/" 'verilog-auto-output-every)
                ;; After we've created all new variables
                (verilog-auto-re-search-do "/\\*AUTOUNUSED\\*/" 'verilog-auto-unused)
                ;; Must be after all inputs outputs are generated
                (verilog-auto-re-search-do "/\\*AUTOARG\\*/" 'verilog-auto-arg)
                ;; User inserts
                (verilog-auto-re-search-do "/\\*AUTOINSERTLAST(.*?)\\*/" 'verilog-auto-insert-last)
                ;; Fix line numbers (comments only)
                (when verilog-auto-inst-template-numbers
                  (verilog-auto-templated-rel))
                (when verilog-auto-template-warn-unused
                  (verilog-auto-template-lint))))
              ;;
              (verilog-run-hooks 'verilog-auto-hook)
              ;;
              (when verilog-auto-delete-trailing-whitespace
                (verilog-delete-trailing-whitespace))
              ;;
              (set (make-local-variable 'verilog-auto-update-tick) (buffer-chars-modified-tick))
              ;;
              ;; If end result is same as when started, clear modified flag
              (cond ((and oldbuf (equal oldbuf (buffer-string)))
                     (set-buffer-modified-p nil)
                     (unless noninteractive (message "Updating AUTOs...done (no changes)")))
                    (t (unless noninteractive (message "Updating AUTOs...done"))))
              ;; End of after-change protection
              )))
       ;; Unwind forms
       ;; Currently handled in verilog-save-font-mods
       ))))

  > "endclass" (progn (electric-verilog-terminate-line) nil))

(define-skeleton verilog-sk-uvm-component
  "Insert a class definition"
  ()
  > "class " (setq name (skeleton-read "Name: ")) " extends " (skeleton-read "Extends: ") ";" \n
  > _ \n
