From 2dd606e437d590ac751854598395c624ae4bd239 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Thu, 2 May 2024 13:34:22 +0200 Subject: [PATCH] Add lexical cookie to new init files * lisp/cus-edit.el (custom-save-all): Add lexical cookie if the file is empty. (cherry picked from commit 2f5c9b31161306b2b4c46c77c351c6ea6a46ff98) --- lisp/cus-edit.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 32cfef6bae4..e94c7fa2376 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4996,6 +4996,8 @@ if only the first line of the docstring is shown.")) ;; readably. (Bug#52554) (print-escape-control-characters t)) (atomic-change-group + (when (eobp) + (insert ";;; -*- lexical-binding: t -*-\n")) (custom-save-variables) (custom-save-faces) (custom-save-icons))) -- 2.39.5