From 166be273c46bd0c8718307a68cc8890818a98265 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Thu, 21 Apr 2022 12:29:48 +0200 Subject: [PATCH] Use lisp-data-mode only if avaliable --- cursory.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cursory.el b/cursory.el index dca159c..de1bf4e 100644 --- a/cursory.el +++ b/cursory.el @@ -166,8 +166,11 @@ With optional LOCAL as a prefix argument, set the Can be assigned to `kill-emacs-hook'." (when cursory--style-hist (with-temp-file cursory-latest-state-file - (insert (concat ";; Auto-generated file;" - " don't edit -*- mode: lisp-data -*-\n")) + (insert ";; Auto-generated file; don't edit -*- mode: " + (if (<= 28 emacs-major-version) + "lisp-data" + "emacs-lisp") + " -*-\n")) (pp (intern (car cursory--style-hist)) (current-buffer))))) (defvar cursory-recovered-preset nil -- 2.34.0