 				       verilog-forward-sexp-function)
 		  hs-special-modes-alist))))
 
+  (add-hook 'completion-at-point-functions
+            #'verilog-completion-at-point nil 'local)
+
   ;; Stuff for autos
   (add-hook 'write-contents-hooks 'verilog-auto-save-check nil 'local)
   ;; verilog-mode-hook call added by define-derived-mode

    (define-key map "\M-\C-b"  'electric-verilog-backward-sexp)
    (define-key map "\M-\C-f"  'electric-verilog-forward-sexp)
    (define-key map "\M-\r"    `electric-verilog-terminate-and-indent)
    (define-key map "\M-\t"    'verilog-complete-word)
    (define-key map "\M-?"     'verilog-show-completions)
    ;; Note \C-c and letter are reserved for users
    (define-key map "\C-c`"    'verilog-lint-off)
    (define-key map "\C-c*"    'verilog-delete-auto-star-implicit)


             ((match-end 17)  ; *sigh* might be a clocking declaration
              (let ((here (point)))
                (cond ((verilog-in-paren)
                       t) ; this is a normal statement
                      ((save-excursion
                         (verilog-beg-of-statement)
                         (looking-at verilog-default-clocking-re))
                       t) ; default clocking, normal statement
                      (t
                       (goto-char here) ; or is clocking, starts a new block
                       (throw 'nesting 'block)))))

             ((looking-at "\\<class\\|struct\\|function\\|task\\>")
              ;; *sigh* These words have an optional prefix:
