summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authornoa@gaiwan.org2024-06-13 08:01:58 +0000
committernoa@gaiwan.org2024-06-13 08:01:58 +0000
commitca53d187418b38cefb3ff32736271f915456dd4d (patch)
treec8647568642de4521c9a841a6a502ca30e85c59b /emacs
parent21c2049b650d6be65d2fc694b9d4ddc10ac376e9 (diff)
Add configuration to automatically mark scripts as executable
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index ca9edce..71cfd29 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -648,6 +648,10 @@ and when JID is not in `jabber-activity-banned'."
 	ispell-extra-args '("--sug-mode=ultra")
 )
 
+
+;; If i write a script, i will always run chmod +x after saving it.  This command means i don't have to do that.
+(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)
+
 ;; We are on a unix system, so it makes sense to end files in the unix system way.  I'm surprised this isn't the default.
 (setopt require-final-newline t)