new fancy config
This commit is contained in:
parent
b9188d14cc
commit
b45712de26
7 changed files with 254 additions and 457 deletions
20
lisp/oxa/utils.el
Normal file
20
lisp/oxa/utils.el
Normal file
|
@ -0,0 +1,20 @@
|
|||
;;; Package management
|
||||
(require 'package)
|
||||
|
||||
(defvar oxa/package-archive-refreshed nil)
|
||||
(defun oxa/refresh-archive ()
|
||||
(when (not oxa/package-archive-refreshed)
|
||||
(package-refresh-contents)
|
||||
(setq oxa/package-archive-refreshed t)))
|
||||
|
||||
;; ensure package
|
||||
(defun oxa/insure (package)
|
||||
(when (not (package-installed-p package))
|
||||
(oxa/refresh-archive)
|
||||
(package-install package)))
|
||||
|
||||
;; Macro to simplify setting mode-local vars
|
||||
(defmacro oxa/hook (hook-name &rest body)
|
||||
`(add-hook ',hook-name '(lambda nil ,@body)))
|
||||
|
||||
(provide 'oxa/utils)
|
Loading…
Add table
Add a link
Reference in a new issue