Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 23, 2025. It is now read-only.
This repository was archived by the owner on Aug 23, 2025. It is now read-only.

Feature request: let :autoloads, :commands, :functions declare symbols for other packages #1086

Open
@heraplem

Description

I often run into situations where package B depends on a symbol from package A.

Usually, it is enough to make sure that the use-package form for package A occurs before the use-package form for package B. It would be nice, though, to be able to decouple the init-file layout from the dependency order of the use-package stanzas.

But the real problem comes if the byte-compiler can't see a needed function symbol from package A. In this case, I have to add a :functions, :commands, etc. to the use-package form for package A. Now the use-package form for package A has to "know" about the fact that another use-package form is going to depend on that symbol, which is less than ideal.

The alternative, of course, is to simply use define-function, etc. as needed, but that also seems less than ideal.

The solution I'm envisioning is to make it so that keywords that declare function symbols can additionally take, for each symbol, the name of the package that that symbol is from, with a syntax similar to :hook.

(use-package c
 :functions (a-foo . a)
 ((b-bar b-baz) . b)
 :config
 (setq c-xxx (+ (a-foo) (b-bar) (b-baz))))
(use-package a)
(use-package b)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /