     (advice-add 'verilog-indent-line-relative :before-until #'my/verilog-selective-indent)
     ;; Advise the indentation done by hitting `TAB'
     (advice-add 'verilog-indent-line          :before-until #'my/verilog-selective-indent)
+
+;;; imenu support
+    ;; Imenu expression for Verilog mode.  See `imenu-generic-expression'
+    (defconst modi/verilog-imenu-generic-expression
+      '(("*Modules*"
+         "^\\s-*\\(\\(m\\(odule\\|acromodule\\)\\)\\|primitive\\)\\s-+\\(?1:[A-Za-z_][A-Za-z0-9_.:]+\\)" 1)
+        ("*Classes*"
+         "^\\s-*\\(\\(static\\|local\\|virtual\\|protected\\)\\b\\s-+\\)*class\\s-+\\(?1:[A-Za-z_][A-Za-z0-9_]+\\)" 1)
+        ("*Tasks*"
+         "^\\s-*\\(\\(static\\|local\\|virtual\\|protected\\)\\b\\s-+\\)*task\\s-+\\(\\(static\\|automatic\\)\\s-+\\)*\\(?1:[A-Za-z_][A-Za-z0-9_:]+\\)" 1)
+        ("*Functions*"
+         "^\\s-*\\(\\(static\\|local\\|virtual\\|protected\\)\\b\\s-+\\)*function\\s-+\\([a-z_]+\\s-+\\)*\\(?1:[A-Za-z_][A-Za-z0-9_:]+\\)" 1))
+      "Generic regular expression to parse Verilog elements for `imenu'.")
 
 ;;; hideshow
     (with-eval-after-load 'setup-fold

    ;; Reset the verilog-mode abbrev table
    (clear-abbrev-table verilog-mode-abbrev-table)

    ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Macros saved as functions
    ;;

;; Time-stamp: <2015-07-13 15:53:55 kmodi>

;;; Verilog

