From e7c01620bc3469b9e2f9433562fcdd9cba54c9ba Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 5 Feb 2014 23:48:23 -0500 Subject: Advice BibTeX cleaning instead of using hook For some reason not obvious to me, adding `km/bibtex-use-title-case' to `bibtex-clean-entry-hook' results in `bibtex-key-in-head' returning nil instead of the citekey. Using advice fixes this. --- lisp/init-bib.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/init-bib.el') diff --git a/lisp/init-bib.el b/lisp/init-bib.el index 653ad6a..ecdd1f1 100644 --- a/lisp/init-bib.el +++ b/lisp/init-bib.el @@ -51,6 +51,7 @@ capitalized." (backward-word) (capitalize-word 1)))))) -(add-hook 'bibtex-clean-entry-hook 'km/bibtex-use-title-case) +(defadvice bibtex-clean-entry (before convert-to-title-case activate) + (km/bibtex-use-title-case)) (provide 'init-bib) -- cgit v1.2.3