summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-02-05 23:48:23 -0500
committerKyle Meyer <kyle@kyleam.com>2014-02-05 23:48:23 -0500
commite7c01620bc3469b9e2f9433562fcdd9cba54c9ba (patch)
tree88eb852f996fd073c4b58acdd8566a12dbac623a
parentf75dcf6c8eb03056c118fbfb99e258db20d51b1e (diff)
downloademacs.d-e7c01620bc3469b9e2f9433562fcdd9cba54c9ba.tar.gz
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.
-rw-r--r--lisp/init-bib.el3
1 files changed, 2 insertions, 1 deletions
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)