aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-07-13 13:24:00 +0200
committerLars Ingebrigtsen2022-07-13 13:25:36 +0200
commit2f7cd9cd732f4e25a06d5e52fde7ff376a1c366e (patch)
treed24a98292816fe5294ca2a1ce287038bcb68d34d /lisp
parentd858e0a18acabe436ee178c85bc9feb610c4eaf8 (diff)
downloademacs-2f7cd9cd732f4e25a06d5e52fde7ff376a1c366e.tar.gz
emacs-2f7cd9cd732f4e25a06d5e52fde7ff376a1c366e.zip
Make bibtex-mode not signal errors when used programmatically
* lisp/textmodes/bibtex.el (bibtex-mode): Ensure that the font lock machinery is set up (bug#48447).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/bibtex.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 6763da046ff..333cfa51695 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -3659,7 +3659,11 @@ if that value is non-nil.
3659 ?\s))))) 3659 ?\s)))))
3660 (if (and buffer-file-name enable-local-variables) 3660 (if (and buffer-file-name enable-local-variables)
3661 (add-hook 'hack-local-variables-hook fun nil t) 3661 (add-hook 'hack-local-variables-hook fun nil t)
3662 (funcall fun)))) 3662 (funcall fun)))
3663 ;; We may be using the mode programmatically to extract data, and we
3664 ;; then need this to be set up first so that sexp-based movement
3665 ;; commands don't bug out.
3666 (font-lock-set-defaults))
3663 3667
3664(defun bibtex-entry-alist (dialect) 3668(defun bibtex-entry-alist (dialect)
3665 "Return entry-alist for DIALECT." 3669 "Return entry-alist for DIALECT."