jwiegley / use-package

A use-package declaration for simplifying your .emacs
https://jwiegley.github.io/use-package
GNU General Public License v3.0
4.39k stars 259 forks source link

Use `emacs` as a dummy feature name to call `use-package`. #948

Closed hongyi-zhao closed 1 year ago

hongyi-zhao commented 3 years ago

I've tried the following configuration and it really works:

(use-package emacs :config (defalias 'yes-or-no-p 'y-or-n-p))

So, it seems that emacs can be used as a dummy named feature when calling use-package.

Am I right?

Regards, HY

rprimus commented 3 years ago

Mon Aug 9 08:35:10 BST 2021

Hi,

Am I right?

Yes.

If you query the variable features in a fresh emacs, you'll see that the first defined named feature is emacs:

emacs -nw -Q -eval "(describe-variable 'features)"

It was first mentioned in:

src/ChangeLog.10:7732:  * fns.c (syms_of_fns): Add `emacs' to features.

It's defined in:

src/fns.c:5999:  Vfeatures = list1 (Qemacs);
hongyi-zhao commented 3 years ago

If you query the variable features in a fresh emacs, you'll see that the first defined named feature is emacs:

I checked with emacs -Q -eval "(describe-variable 'features)", and find that it's the last defined named feature:

image

Mihara commented 2 years ago

And yet, use-package-lint complains that emacs module cannot be located.

skangas commented 1 year ago

And yet, use-package-lint complains that emacs module cannot be located.

I can't reproduce this using:

(use-package emacs)

And then M-x use-package-lint. Could you give more details about where you're seeing this?

skangas commented 1 year ago

More information was requested, but none was provided within 23 days. I also can't reproduce the issue, so I'm closing it now. If this is still an issue, please report back and we can reopen. Thanks.