end-of-defun, and so on.
imenusupport using the aforementioned class definition recognition. In addition to recognizing top-level functions,
imenuwill recognize methods.
The following fix from Sylecn addresses a bug where the metadata block in Greasemonkey scripts confuses the syntax highlighter:
(eval-after-load 'js '(progn (setq js--regexp-literal-fix "[^=][=(,:]\\(?:\\s-\\|\n\\)*\\(/\\)\\(?:\\\\.\\|[^/*\\]\\)\\(?:\\\\.\\|[^/\\]\\)*\\(/\\)") (setq js-font-lock-syntactic-keywords-fix ;; "|" means generic string fence `((,js--regexp-literal-fix (1 "|") (2 "|")))) (setq js-font-lock-syntactic-keywords js-font-lock-syntactic-keywords-fix)))