diff options
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 |