From 108adbe40bd66a08adffb3ce26aedce4a7e6b226 Mon Sep 17 00:00:00 2001 From: Stefan Ellmauthaler Date: Fri, 29 Apr 2022 13:56:05 +0200 Subject: [PATCH] Fix non-autofill for latex paper in emacs --- programs/emacs/default.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/programs/emacs/default.el b/programs/emacs/default.el index 96cca29..2a3f21c 100644 --- a/programs/emacs/default.el +++ b/programs/emacs/default.el @@ -247,8 +247,9 @@ :demand t :no-require t :preface (defun mm/disable-auto-fill-for-papers () - (auto-fill-mode - (string-match "ellmau/repo/" (buffer-file-name)))) + (if (string-match "ellmau/repo/" (buffer-file-name)) + (progn (turn-off-auto-fill) + (setq-local yas--original-auto-fill-function nil)))) :hook ((LaTeX-mode . flyspell-mode) (LaTeX-mode . latex-math-mode)