]> git.eshelyaron.com Git - emacs.git/commitdiff
highlight use-package before typing package name
authorNoam Postavsky <npostavs@gmail.com>
Wed, 14 Aug 2013 03:33:18 +0000 (23:33 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Wed, 4 Sep 2013 01:55:38 +0000 (21:55 -0400)
This follow the same pattern as the highlighting for provide and require
from `lisp-font-lock-keywords-2' in font-lock.el

lisp/use-package/use-package.el

index 8077f2e8798606e0d3aee7eeb295091ef02e94ca..fea1aea0fce5377f00cf1d1b0bd69c3bc05897ff 100644 (file)
@@ -661,9 +661,9 @@ For full documentation. please see commentary.
 (put 'use-package 'lisp-indent-function 1)
 
 (defconst use-package-font-lock-keywords
-  '(("(\\(use-package\\)\\_>[\n[:space:]]+\\(\\(?:\\s_\\|\\sw\\)+\\)"
+  '(("(\\(use-package\\)\\_>[ \t']*\\(\\sw+\\)?"
      (1 font-lock-keyword-face)
-     (2 font-lock-constant-face))))
+     (2 font-lock-constant-face nil t))))
 
 (font-lock-add-keywords 'emacs-lisp-mode use-package-font-lock-keywords)