[Top][All Lists]

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

Re: using use-package

From: Phillip Lord
Subject: Re: using use-package
Date: Tue, 28 Jun 2016 23:34:42 +0100
User-agent: SquirrelMail/1.5.2 [SVN]

On Tue, June 28, 2016 11:05 pm, Stefan Monnier wrote:
>>> Well I would have thought that needing eval-after-load and relatives
>>> is evidence of a badly written (in Stefan's sense) package

Yeah, I missed the "not" in this paragraph.

> I do think it's a problem, but admittedly, the way keymaps are normally
> setup there's no standard&easy way for the package to "do the right
> thing".

But not evidence of a badly written package:-)

> IOW it's a failure of the general infrastructure offered by Emacs to
> define and modify keymaps.  I'd encourage anyone to try and come up with a
> good solution to this problem (it'll probably require changing "all"
> packages to use a new way to declare keymaps, but I think it's a price
> worth paying).

>>> For myself (as you seem to say) if use-package reduces all that
>>> imperative gunk I guess I'll use it
> As for me, I don't think
> (global-set-key (kbd "C-x C-b") 'electric-buffer-list)
> (with-eval-after-load 'buff-menu
> (define-key electric-buffer-menu-mode-map
> (kbd "X") 'save-buffers-kill-emacs))
> is really worse than
> (use-package ebuff-menu
> :bind (("C-x C-b" . electric-buffer-list)
> :map electric-buffer-menu-mode-map
> ("X" . save-buffers-kill-emacs)))

> especially if you consider that the former uses functions and syntax which
> is used throughout Emacs, whereas the latter uses a syntax that's defined
> in an ad-hoc manner for use-package and isn't used elsewhere.

use-package adds a bit of functionality (M-x
describe-personal-keybindings). Of course, this only works because the
latter is not used elsewhere.

I agree it's marginal here.


reply via email to

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