From ca53d187418b38cefb3ff32736271f915456dd4d Mon Sep 17 00:00:00 2001 From: noa@gaiwan.org Date: Thu, 13 Jun 2024 08:01:58 +0000 Subject: Add configuration to automatically mark scripts as executable --- emacs/init.el | 4 ++++ 1 file changed, 4 insertions(+) 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) -- cgit 1.4.1-2-gfad0