;;; -*- lexical-binding: t -*- ;; ;; all Bibtex: ;; https://dataswamp.org/~incal/emacs-init/bibtex/ ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/bibtex/bibtex-incal.el (require 'bibtex) (require 'bibtex-autokey-insert) (require 'bibtex-book) (require 'bibtex-field) (require 'cl-lib) (require 'mode-line) (require 'super) (setq bibtex-comment-start "%") (setq bibtex-help-message nil) (setq bibtex-autokey-edit-before-use nil) (setq bibtex-autokey-titleword-ignore '("A" "An" "The")) (setq bibtex-autokey-titleword-length nil) (setq bibtex-autokey-titleword-separator "-") (cl-loop for (r w) in `(("ä" "a") ("Ä" "A") ("å" "a") ("Å" "A") ("é" "e") ("É" "E") ("ö" "o") ("Ö" "O") ("ń" "n") ("Ń" "N") ("ś" "s") ("Ś" "S") ) do (add-to-list 'bibtex-autokey-titleword-change-strings (cons r w)) ) (defun bibtex-keys () (let ((kmap bibtex-mode-map)) (disable-super-global-keys kmap) (keymap-set kmap "C-M-n" #'bibtex-next-entry) (keymap-set kmap "C-M-p" #'bibtex-previous-entry) (define-key kmap [backtab] #'bibtex-prev-field) (keymap-set kmap "TAB" (lambda () (interactive) (bibtex-next-field t))) (keymap-set kmap "M-n" #'bibtex-autokey-insert-check-isbn) (keymap-set kmap "C-c C-c" #'validate-compile-count) )) (defun bibtex-mode-hook-f () (bibtex-keys) (lines) ) (add-hook 'bibtex-mode-hook #'bibtex-mode-hook-f) (provide 'bibtex-incal)