emacsorphanage / req-package

dependency management system on top of use-package
GNU General Public License v3.0
152 stars 14 forks source link

Set indent style for `req-package` #2

Closed haxney closed 10 years ago

haxney commented 10 years ago

use-package uses the defun indentation style, and it would be nice if req-package did the same. This can be accomplished by adding

(declare (indent 'defun))

After the docstring of req-package or adding

(put 'req-package 'lisp-indent-function 'defun)

somewhere after the definition of req-package.

edvorg commented 10 years ago

Thanks, done. Package update at melpa will arrive soon :)

wrachwal commented 10 years ago

there is yet a bit code to "steal" from use-package to get req-package symbol having the same face as require, use-require:

(defconst req-package-font-lock-keywords
  '(("(\\(req-package\\)\\_>[ \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)?"
     (1 font-lock-keyword-face)
     (2 font-lock-constant-face nil t))))

(font-lock-add-keywords 'emacs-lisp-mode req-package-font-lock-keywords)
edvorg commented 10 years ago

ok, done