diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-09-20 20:24:50 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-09-20 20:24:50 -0400 |
commit | 7ce5f42ed6b18207365c1aa35530003a7eccc14a (patch) | |
tree | 56d128972edeff7a6fd75ce14b5612140a3133ab /lisp | |
parent | bd91dc120cab74287d58736648fb9880d6528ab8 (diff) | |
download | emacs.d-7ce5f42ed6b18207365c1aa35530003a7eccc14a.tar.gz |
bibtex-clean-entry-hook: Downcase entry type
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-bib.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/init-bib.el b/lisp/init-bib.el index 39840ee..06d59d9 100644 --- a/lisp/init-bib.el +++ b/lisp/init-bib.el @@ -19,6 +19,7 @@ (add-hook 'bibtex-clean-entry-hook 'km/bibtex-remove-doi-leader) (add-hook 'bibtex-clean-entry-hook 'km/bibtex-set-coding-system) (add-hook 'bibtex-clean-entry-hook 'km/bibtex-remove-entry-space) +(add-hook 'bibtex-clean-entry-hook 'km/bibtex-downcase-entry) (defvar km/bibtex-unimportant-title-words '("a" "aboard" "about" "above" "absent" "across" "after" "against" @@ -107,6 +108,13 @@ to (when (looking-at "@\\w+\\(\\s-+\\)") (replace-match "" nil nil nil 1)))) +(defun km/bibtex-downcase-entry () + (save-excursion + (bibtex-beginning-of-entry) + (when (looking-at "^@\\([^{]+\\){") + (replace-match (downcase (match-string-no-properties 1)) + 'fixedcase nil nil 1)))) + (defun km/bibtex-pages-use-double-hyphen () "Use double hyphen for page range." (save-excursion |