From 7888c07c0a2d40cbad25b4817c5b831a81992bd3 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 16 Dec 2015 22:38:30 +0100 Subject: Stop trying to create TAGS after save --- emacs/.emacs.d/init.el | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'emacs') 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) -- cgit v1.2.3-54-g00ecf