This is the code I found in my .emacs -- It is now adapted to name the menu "Outline" (instead of "Index" or "Imenu"):
;; Add Imenu to the menu bar in any mode that supports it.
(defun try-to-add-imenu ()
(condition-case nil
(imenu-add-to-menubar "Outline") ;; Imenu index
(error nil)))
(add-hook 'font-lock-mode-hook #'try-to-add-imenu)
This is the code I found in my .emacs -- It is now adapted to name the menu "Outline" (instead of "Index" or "Imenu"):
Thanks to @lawlist.