]> git.eshelyaron.com Git - emacs.git/commitdiff
(sgml-mode): Set imenu-generic-expression.
authorKarl Heuer <kwzh@gnu.org>
Thu, 4 Dec 1997 04:20:34 +0000 (04:20 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 4 Dec 1997 04:20:34 +0000 (04:20 +0000)
lisp/textmodes/sgml-mode.el

index 8dfd427f9b4d9048dc3d5fdbde674e160f840555..bc2902e0d9f5d2beaf494ecec990faa0a4827ac2 100644 (file)
@@ -369,6 +369,11 @@ Do \\[describe-key] on the following bindings to discover what they do.
 \\{sgml-mode-map}"
   (interactive)
   (sgml-mode-common sgml-tag-face-alist sgml-display-text)
+  ;; Set imenu-generic-expression here, rather than in sgml-mode-common,
+  ;; because this definition probably is not useful in HTML mode.
+  (make-local-variable 'imenu-generic-expression)
+  (setq imenu-generic-expression
+       "<!\\(element\\|entity\\)[ \t\n]+%?[ \t\n]*\\([A-Za-z][-A-Za-z.0-9]*\\)")
   (use-local-map sgml-mode-map)
   (setq mode-name "SGML"
        major-mode 'sgml-mode))