summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-12-16 22:38:30 +0100
committerGravatar Tom Willemse2015-12-16 22:38:30 +0100
commit7888c07c0a2d40cbad25b4817c5b831a81992bd3 (patch)
treeb194228ab1336412ff7af568e831764b07f48096 /emacs
parent3f90dcdd7dc69ae593bae8f46617e39d4cb6f158 (diff)
downloaddotfiles-7888c07c0a2d40cbad25b4817c5b831a81992bd3.tar.gz
dotfiles-7888c07c0a2d40cbad25b4817c5b831a81992bd3.zip
Stop trying to create TAGS after save
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.el16
1 files changed, 5 insertions, 11 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index 50fe8f1..e13c78b 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -137,16 +137,6 @@ MODE1 is enabled and vice-versa."
;;;; Functions
-(defun oni:after-save-func ()
- "Function for `after-save-hook'."
- (executable-make-buffer-file-executable-if-script-p)
- (let* ((dom-dir (locate-dominating-file (buffer-file-name) "Makefile"))
- (TAGSp (not (string= "" (shell-command-to-string
- (concat "grep \"^TAGS:\" " dom-dir "Makefile"))))))
- (when (and dom-dir TAGSp)
- (shell-command
- (concat "make -C " dom-dir " TAGS >/dev/null 2>&1")))))
-
(defun oni:augment-sql-prompt ()
"Add the MariaDB prompt to the `sql-prompt-regexp'."
(if (eq sql-product 'mysql)
@@ -1100,7 +1090,11 @@ If no direction is given, don't split."
;;;; Hooks
(add-hook 'eshell-first-time-mode-hook 'oni-eshell-set-prompt)
-(add-hook 'after-save-hook 'oni:after-save-func t)
+
+;; Automatically make shell scripts executable after saving.
+(add-hook 'after-save-hook
+ 'executable-make-buffer-file-executable-if-script-p :append)
+
(add-hook 'before-save-hook 'oni:before-save-func)
(add-hook 'css-mode-hook #'rainbow-mode)
(add-hook 'diary-display-hook 'oni:diary-display-func)