From: Roland Winkler Date: Tue, 25 Jun 2013 09:15:44 +0000 (+1200) Subject: bibtex-mode: Update imenu-support when dialect changes X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1992^2~48 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=45f431c60e02c7a290f8a11c9189b735781749b4;p=emacs.git bibtex-mode: Update imenu-support when dialect changes --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 41000df890d..9cd341bfccf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-06-25 Rüdiger Sonderfeld + + * lisp/textmodes/bibtex.el (bibtex-mode, bibtex-set-dialect): + Update imenu-support when dialect changes. + 2013-06-25 Leo Liu * ido.el (ido-read-internal): Allow forward slash on windows. diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 01a126eb381..6280e19b637 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -3400,9 +3400,6 @@ if that value is non-nil. (set (make-local-variable 'syntax-propertize-function) (syntax-propertize-via-font-lock bibtex-font-lock-syntactic-keywords)) - (setq imenu-generic-expression - (list (list nil bibtex-entry-head bibtex-key-in-head)) - imenu-case-fold-search t) ;; Allow `bibtex-dialect' as a file-local variable. (add-hook 'hack-local-variables-hook 'bibtex-set-dialect nil t)) @@ -3479,7 +3476,10 @@ LOCAL is t for interactive calls." (concat "^[ \t]*@[ \t]*\\(?:" (regexp-opt (append '("String" "Preamble") - (mapcar 'car bibtex-entry-alist))) "\\)")))) + (mapcar 'car bibtex-entry-alist))) "\\)")) + (setq imenu-generic-expression + (list (list nil bibtex-entry-head bibtex-key-in-head)) + imenu-case-fold-search t))) ;; Entry commands and menus for BibTeX dialects ;; We do not use `easy-menu-define' here because this gets confused