about summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2021-10-07 17:28:30 -0500
committerCase Duckworth2021-10-07 17:28:30 -0500
commitb2eb31629e96043163f6e210b4fc8b7f72b63f16 (patch)
treed513309ace686c7d0141d436b2c8304f0851122d /init.el
parentChange widths of things (diff)
downloademacs-b2eb31629e96043163f6e210b4fc8b7f72b63f16.tar.gz
emacs-b2eb31629e96043163f6e210b4fc8b7f72b63f16.zip
Begin on acdw-auto-insert.el
XXX It doesn't work right now
Diffstat (limited to 'init.el')
-rw-r--r--init.el34
1 files changed, 34 insertions, 0 deletions
diff --git a/init.el b/init.el index fcf37c8..ac88cde 100644 --- a/init.el +++ b/init.el
@@ -13,7 +13,9 @@
13;; Everyone is permitted to do whatever with this software, without 13;; Everyone is permitted to do whatever with this software, without
14;; limitation. This software comes without any warranty whatsoever, 14;; limitation. This software comes without any warranty whatsoever,
15;; but with two pieces of advice: 15;; but with two pieces of advice:
16
16;; - Be kind to yourself. 17;; - Be kind to yourself.
18
17;; - Make good choices. 19;; - Make good choices.
18 20
19;;; Commentary: 21;;; Commentary:
@@ -94,6 +96,38 @@
94 (expand-file-name-exists-p "pkg/" user-emacs-directory))) 96 (expand-file-name-exists-p "pkg/" user-emacs-directory)))
95 (normal-top-level-add-subdirs-to-load-path))) 97 (normal-top-level-add-subdirs-to-load-path)))
96 98
99(setup autoinsert
100 (require 'acdw-autoinsert)
101 (acdw/define-auto-insert '(:replace t)
102 ;; This is my custom auto-insert for elisp files.
103 '("\\.el\\'" . "Emacs Lisp header (acdw)")
104 '("Short description: " ";;; "
105 (file-name-nondirectory (buffer-file-name))
106 " --- " str
107 (make-string (max 2 ( - 80 (current-column) 27)) 32)
108 "-*- lexical-binding: t; -*-"
109 '(setq lexical-binding t)
110 "\n\n;; Copyright (C) " (format-time-string "%Y")
111 " " (getenv "ORGANIZATION") | (progn user-full-name)
112 "\n\n;; Author: " (user-full-name)
113 '(if (search-backward "&" (line-beginning-position) t)
114 (replace-match (capitalize (user-login-name)) t t))
115 '(end-of-line 1)
116 " <" (progn user-mail-address) ">"
117 & -2
118 "\n\n;;; License:"
119 "\n\n;; Everyone is permitted to do whatever with this software, without"
120 "\n;; limitation. This software comes without any warranty whatsoever,"
121 "\n;; but with two pieces of advice:"
122 "\n\n;; - Be kind to yourself."
123 "\n\n;; - Make good choices."
124 "\n\n;;; Commentary:"
125 "\n\n;; " _
126 "\n\n;;; Code:"
127 "\n\n\n\n(provide '" (file-name-base (buffer-file-name)) ")"
128 "\n;;; " (file-name-nondirectory (buffer-file-name)) " ends here\n"))
129 (auto-insert-mode +1))
130
97(setup autorevert 131(setup autorevert
98 (:option global-auto-revert-non-file-buffers t 132 (:option global-auto-revert-non-file-buffers t
99 auto-revert-verbose nil) 133 auto-revert-verbose nil)