From: Mattias EngdegÄrd Date: Thu, 2 May 2024 11:34:22 +0000 (+0200) Subject: Add lexical cookie to new init files X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2dd606e437d590ac751854598395c624ae4bd239;p=emacs.git 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) --- 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)))