From: Noam Postavsky Date: Wed, 14 Aug 2013 03:33:18 +0000 (-0400) Subject: highlight use-package before typing package name X-Git-Tag: emacs-29.0.90~1306^2~15^2~444^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=57f80d4ff164fd1f3c89d4998128a0b9d8b6b102;p=emacs.git highlight use-package before typing package name This follow the same pattern as the highlighting for provide and require from `lisp-font-lock-keywords-2' in font-lock.el --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 8077f2e8798..fea1aea0fce 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -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)