Compile files to elc
This commit is contained in:
parent
4e3bdc6352
commit
bf729d6ea3
5 changed files with 23 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,3 +2,4 @@ auto-save-list
|
|||
projectile*
|
||||
backups
|
||||
elpa
|
||||
*.elc
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
;;; behaviour.el --- how emacs should behave
|
||||
;;; Commentary:
|
||||
;;; Code:
|
||||
;;; Safely save garbage files into emacs.d
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;; Overall behaviour ;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(setq backup-directory-alist
|
||||
|
|
@ -151,6 +150,8 @@
|
|||
;; Show projectile lists by most recently active
|
||||
(setq projectile-sort-order (quote recently-active))
|
||||
|
||||
;; (add-hook 'projectile-find-file-hook 'projectile-invalidate-cache)
|
||||
|
||||
; Use VIM mode
|
||||
(require 'evil)
|
||||
(require 'evil-leader)
|
||||
|
|
@ -196,7 +197,4 @@ You can disable `clean-buffer-list' by (cancel-timer clean-buffer-list-timer)."
|
|||
(setq clean-buffer-list-kill-never-regexps
|
||||
(append '("^\\*EMMS Playlist\\*.*$")
|
||||
clean-buffer-list-kill-never-regexps-init))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Additional loads ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(load "~/.emacs.d/languages.el")
|
||||
;;; behaviour.el ends here
|
||||
|
|
|
|||
17
functions.el
17
functions.el
|
|
@ -24,4 +24,21 @@
|
|||
(set-face-attribute 'helm-header nil :font
|
||||
(format "Hasklig %d"
|
||||
(+ size 2))))
|
||||
|
||||
;;;; Functions related to compilation of files
|
||||
(defun byte-compile-init-dir ()
|
||||
"Byte-compile all your dotfiles."
|
||||
(interactive)
|
||||
(byte-recompile-directory user-emacs-directory 0))
|
||||
|
||||
(defun remove-elc-on-save ()
|
||||
"If you're saving an elisp file, likely the .elc is no longer valid."
|
||||
(add-hook 'after-save-hook
|
||||
(lambda ()
|
||||
(if (file-exists-p (concat buffer-file-name "c"))
|
||||
(delete-file (concat buffer-file-name "c"))))
|
||||
nil
|
||||
t))
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook 'remove-elc-on-save)
|
||||
;;; functions.el ends here
|
||||
|
|
|
|||
|
|
@ -91,8 +91,7 @@
|
|||
|
||||
(set-indent 2)
|
||||
|
||||
(flycheck-mode 1)
|
||||
(set-width 80))
|
||||
(flycheck-mode 1))
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook 'elisp-mode-config)
|
||||
(add-hook 'emacs-lisp-mode-hook 'flycheck-mode)
|
||||
|
|
@ -114,7 +113,7 @@
|
|||
|
||||
(add-hook 'html-mode-hook 'web-mode)
|
||||
(add-hook 'html-mode-hook 'web-mode-config)
|
||||
(add-hook 'markdown-mode-hook 'set-width-120)
|
||||
(add-hook 'html-mode-hook 'set-width-120)
|
||||
|
||||
(setq web-mode-markup-indent-offset 2)
|
||||
(setq web-mode-code-indent-offset 2)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
:background "#2c3a47")
|
||||
|
||||
(set-face-attribute 'font-lock-comment-delimiter-face nil
|
||||
:foreground "#5F6D7A")
|
||||
:foreground "#aabcce")
|
||||
(set-face-attribute 'mode-line nil :font "Hasklig 13")
|
||||
(set-face-attribute 'fringe nil :background "#2c3a47"
|
||||
:slant 'normal))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue