Created
February 9, 2015 04:46
-
-
Save tani/c5ae0ea5e50d11ccb6b4 to your computer and use it in GitHub Desktop.
use-package.el like macro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro use (elisp &rest body) | |
(declare (indent defun)) | |
`(when (require (quote ,elisp) nil t) ,@body)) | |
(font-lock-add-keywords | |
'emacs-lisp-mode | |
'(("(\\(use\\)\\_>[ \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)" | |
(1 font-lock-keyword-face) (2 font-lock-constant-face)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment