From 9ba030fff8b6f017a795a48d7b6b8973685db4aa Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 5 Jan 2022 11:25:16 -0600 Subject: Fix +Emacs lisp auto-insert --- init.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/init.el b/init.el index 5586f64..4b899cc 100644 --- a/init.el +++ b/init.el @@ -107,16 +107,17 @@ (setup auto-insert (setf (alist-get '("lisp/.*\\.el\\'" . "+Emacs lisp") auto-insert-alist nil nil #'equal) - '("" ";;; " (file-name-nondirectory (buffer-file-name)) - (make-string (max 2 (- fill-column (current-column) 27)) 32) - "-*- lexical-binding: t; -*-" - '(setq lexical-binding t) - "\n\n;;Copyright (C) " (format-time-string "%Y") - " " (progn user-full-name) - "\n\n;;; Code:" - "\n\n" _ - "\n\n(provide '" (file-name-base (buffer-file-name)) ")" - "\n;;; " (file-name-nondirectory (buffer-file-name)) " ends here\n")) + `(nil ";;; " (file-name-nondirectory (buffer-file-name)) + (make-string (max 2 (- fill-column (current-column) 27)) 32) + "-*- lexical-binding: t; -*-" '(setq lexical-binding t) + ,(concat "\n\n;;; Commentary:" + "\n\n;; ") _ + ,(concat "\n\n;;; Code:" + "\n\n" + "\n\n(provide '") + (file-name-base (buffer-file-name)) + ,(concat ")" "\n;;; ") + (file-name-nondirectory (buffer-file-name)) " ends here\n")) (auto-insert-mode +1)) (setup autorevert -- cgit 1.4.1-21-gabe81