From: "Rüdiger Sonderfeld" <ruediger@c-plusplus.de>
To: emacs-devel@gnu.org
Cc: winkler@gnu.org
Subject: [PATCH 1/2] bibtex.el: Fix imenu support.
Date: Wed, 12 Jun 2013 00:41:04 +0200 [thread overview]
Message-ID: <8168665.uZZAIiq8gV@descartes> (raw)
The bug was introduced in revision 104969.
* lisp/textmodes/bibtex.el (bibtex-mode, bibtex-set-dialect): Update
imenu-support when dialect changes.
Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
---
lisp/textmodes/bibtex.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 01a126e..6280e19 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -3400,9 +3400,6 @@ (define-derived-mode bibtex-mode nil "BibTeX"
(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 @@ (defun bibtex-set-dialect (&optional dialect local)
(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
--
1.8.3
next reply other threads:[~2013-06-11 22:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-11 22:41 Rüdiger Sonderfeld [this message]
2013-06-25 9:20 ` [PATCH 1/2] bibtex.el: Fix imenu support Roland Winkler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8168665.uZZAIiq8gV@descartes \
--to=ruediger@c-plusplus.de \
--cc=emacs-devel@gnu.org \
--cc=winkler@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.