Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The autoload of CTRLF breaks Emacs startup #49

Closed
AmaiKinono opened this issue May 18, 2020 · 4 comments
Closed

The autoload of CTRLF breaks Emacs startup #49

AmaiKinono opened this issue May 18, 2020 · 4 comments

Comments

@AmaiKinono
Copy link
Contributor

I updated to the latest version, then I got this when Emacs startup:

Symbol's function definition is void: map-apply

The weird thing is even I remove the use-package code of CTRLF, this still happens. I looked into it and found it may be caused by this in the autoload:

(define-minor-mode ctrlf-mode "Minor mode to use CTRLF in place of Isearch.
See `ctrlf-mode-bindings' to customize." :global t :keymap ctrlf--keymap (when ctrlf-mode (setcdr ctrlf--keymap nil) (map-apply (lambda (key cmd) (when (stringp key) (setq key (kbd key))) (define-key ctrlf--keymap key cmd)) ctrlf-mode-bindings)) (with-eval-after-load (quote ctrlf) (if ctrlf-mode (advice-add (function minibuffer-message) :around (function ctrlf--minibuffer-message-condense)) (advice-remove (function minibuffer-message) (function ctrlf--minibuffer-message-condense)))))

When I delete straight/build-cache.el, Emacs could startup correctly, but when I open Emacs again, it fails. Notice that the use-package code of CTRLF is already removed, but I think straight still builds it since it's in straight/repos.

A simple fix is add ;;;###autoload on (require 'map), but I'm not sure if this is a good fix.

raxod502 added a commit that referenced this issue May 18, 2020
@raxod502
Copy link
Member

I think straight still builds it since it's in straight/repos.

It should not. If it does, that is a bug, and a very bad one. It may have to do with the autoloads caching system in straight.el. You can check on it by seeing if the behavior depends on the value of straight-cache-autoloads. If you find that it does seem to be a bug in straight.el, I would suggest opening a bug report on that tracker.

I'm not sure if this is a good fix.

Better is to (require 'map) before the usage of map-apply. Let me know if the linked commit fixes the issue for you.

@raxod502
Copy link
Member

If so I will update the changelog.

@AmaiKinono
Copy link
Contributor Author

If you find that it does seem to be a bug in straight.el, I would suggest opening a bug report on that tracker.

I will if I could find a reproduce recipe.

Let me know if the linked commit fixes the issue for you.

It does :D

@raxod502
Copy link
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants