diff --git a/core/defuns/defuns-compile.el b/core/defuns/defuns-compile.el deleted file mode 100644 index 44a50b21f..000000000 --- a/core/defuns/defuns-compile.el +++ /dev/null @@ -1,30 +0,0 @@ -;;; defuns-compile.el - -;;;###autoload -(defun narf/is-recompilable-p () - "Does an .elc file exist and is this file in the .emacs.d folder?" - (let ((file-name (buffer-file-name))) - ;; TODO Detect init.el and init-load-path.el - (and (f-exists? (f-expand (concat (f-base file-name) ".elc") (f-dirname file-name))) - (--any? (f-child-of? file-name it) - (append (list narf-core-dir narf-modules-dir - narf-core-dir narf-modules-dir - narf-private-dir)))))) - -;;;###autoload (autoload 'narf:compile-el "defuns-compile" nil t) -(evil-define-command narf:compile-el (&optional bang) - :repeat nil - (interactive "") - (byte-recompile-file (f-expand "init-load-path.el" narf-emacs-dir) nil 0) - (if (and (eq major-mode 'emacs-lisp-mode) (not bang)) - (byte-recompile-file (buffer-file-name) t 0) - (load (concat narf-script-dir "byte-compile.el")))) - -;;;###autoload (autoload 'narf:compile-autoloads "defuns-compile" nil t) -(evil-define-command narf:compile-autoloads (&optional bang) - :repeat nil - (interactive "") - (load (concat narf-script-dir "generate-autoloads.el"))) - -(provide 'defuns-compile) -;;; defuns-compile.el ends here diff --git a/modules/defuns/defuns-lisp.el b/modules/defuns/defuns-lisp.el index 22aab4fa0..71a44c3c5 100644 --- a/modules/defuns/defuns-lisp.el +++ b/modules/defuns/defuns-lisp.el @@ -46,7 +46,12 @@ ;;;###autoload (defun narf/elisp-auto-compile () - (when (narf/is-recompilable-p) + (when (let ((file-name (buffer-file-name))) + (and (f-exists? (f-expand (concat (f-base file-name) ".elc") (f-dirname file-name))) + (--any? (f-child-of? file-name it) + (append (list narf-core-dir narf-modules-dir + narf-core-dir narf-modules-dir + narf-private-dir))))) (narf:compile-el))) ;;;###autoload diff --git a/private/my-commands.el b/private/my-commands.el index 438ca4b0e..46e5263ce 100644 --- a/private/my-commands.el +++ b/private/my-commands.el @@ -1,8 +1,6 @@ ;;; my-commands.el ;; Emacs utilities -(exmap "acomp[ile]" 'narf:compile-autoloads) ; compile autoloads -(exmap "bcomp[ile]" 'narf:compile-el) (exmap "echo" 'narf:echo) (exmap "minor" 'helm-describe-modes) ; list minor modes ;; Quick mapping keys to commands, allows :nmap \m !make