help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using use-package


From: Rusi
Subject: Re: using use-package
Date: Mon, 10 Aug 2015 05:14:46 -0700 (PDT)
User-agent: G2/1.0

On Monday, August 10, 2015 at 3:22:28 PM UTC+5:30, Phillip Lord wrote:
> Stefan Monnier  writes:
> 
> >> Putting in the core is rather some distance from promoting as the "one
> >> true way"
> >
> > FWIW, lots of use-package is designed to work around flaws in packages.
> >
> > E.g. the :load-path thingy should never be necessary since the package's
> > own autoloads should already take care of that.
> 
> You are correct about the :load-path thingy, although I use this for my
> own packages which I run "straight from source" as it where, rather than
> install as a ELPA package proper.
> 
> 
> > Or to take another example from https://github.com/jwiegley/use-package:
> >
> >    (use-package foo
> >      :init
> >      (setq foo-variable t)
> >      :config
> >      (foo-mode 1))
> >
> > For any properly written foo-mode, the above can be replaced with
> >
> >      (setq foo-variable t)
> >      (foo-mode 1)
> >
> > and it should work just as well.
> 
> 
> No, you are missing (several) points of use-package. First (and
> trivially) the use-package statement groups everything syntactically.
> So, it's more like:
> 
> (progn
>   (setq foo-variable t)
>   (foo-mode 1))
> 
> This is nicer because it groups all the configuration together, so you
> can move, comment, delete or eval it all together. Of course, `progn'
> achieves the same thing.

Yeah  :disabled 
is so much neater than commenting out/deleting/moving large blocks of code

Likewise
(use-package foo ... )

is like a docstring ie the '...' is docstringed by the foo


reply via email to

[Prev in Thread] Current Thread [Next in Thread]