use-package icon indicating copy to clipboard operation
use-package copied to clipboard

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

Open hongyi-zhao opened this issue 4 years ago • 3 comments

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

hongyi-zhao avatar Aug 09 '21 06:08 hongyi-zhao

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);

rprimus avatar Aug 09 '21 07:08 rprimus

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

hongyi-zhao avatar Aug 10 '21 00:08 hongyi-zhao

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

Mihara avatar Feb 05 '22 20:02 Mihara

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 avatar Nov 16 '22 17:11 skangas

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.

skangas avatar Dec 09 '22 05:12 skangas