Update stuff

This commit is contained in:
Alexander Rosenberg 2024-10-14 02:10:55 -07:00
parent 566d338a9a
commit cc91d6b7b7
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -1097,6 +1097,11 @@ otherwise, call `bibtex-find-text'."
"Set up `bibtex-mode' indentation stuff." "Set up `bibtex-mode' indentation stuff."
(setq-local indent-line-function 'my/bibtex-indent-line (setq-local indent-line-function 'my/bibtex-indent-line
electric-indent-chars '(?\n ?\{ ?\} ?,))) electric-indent-chars '(?\n ?\{ ?\} ?,)))
(defun my/-bibtex-fix-fill-prefix ()
"`bivtex-mode' has a bad habbit of messing up `fill-prefix'."
(when (eq major-mode 'bibtex-mode)
(setq-local fill-prefix nil)))
(advice-add 'bibtex-mode :after 'my/-bibtex-fix-fill-prefix)
(add-hook 'bibtex-mode-hook 'my/-bibtex-setup-indent) (add-hook 'bibtex-mode-hook 'my/-bibtex-setup-indent)
(define-key bibtex-mode-map (kbd "RET") 'newline-and-indent) (define-key bibtex-mode-map (kbd "RET") 'newline-and-indent)
(define-key bibtex-mode-map (kbd "TAB") 'my/bibtex-indent-or-find-text) (define-key bibtex-mode-map (kbd "TAB") 'my/bibtex-indent-or-find-text)