Remove compile ex commands
This commit is contained in:
parent
731a042a7b
commit
b2d7e3ac6a
3 changed files with 6 additions and 33 deletions
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue