]> git.eshelyaron.com Git - emacs.git/commitdiff
use-package: use defun as lisp-indent-function
authorJonas Bernoulli <jonas@bernoul.li>
Mon, 9 Dec 2013 23:33:02 +0000 (00:33 +0100)
committerJonas Bernoulli <jonas@bernoul.li>
Mon, 9 Dec 2013 23:44:11 +0000 (00:44 +0100)
When `use-package' is called with only one keyword it is useful to
write:

(use-package foo :init
  (progn
    ... long lines ...))

instead of

(use-package foo
  :init (progn
     ... *too* long lines ...))

or

(use-package foo
  :init
  (progn
    ... long lines ...))

Even when there are multiple keywords or when one never wants to format
the calls to `use-package' as in the first example the use of `defun'
does not really pose a problem.

lisp/use-package/use-package.el

index f4d5e7b6f380a13ecfb76f456171b3de55d44f9b..2d75c549b21026e436d03c64f30b36dbe25d7842 100644 (file)
@@ -574,7 +574,7 @@ For full documentation. please see commentary.
                      ,config-body
                      t))))))))
 
-(put 'use-package 'lisp-indent-function 1)
+(put 'use-package 'lisp-indent-function 'defun)
 
 (defconst use-package-font-lock-keywords
   '(("(\\(use-package\\)\\_>[ \t']*\\(\\(?:\\sw\\|\\s_\\)+\\)?"