-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix: Symbol’s function definition is void: window-purpose/save-dedicated-windows #16413
Conversation
…ted-windows Commit 1ce1b0e introduced a bug due to incorrect usage of define-advice. This commit refactors the change by: - Extracting the advices to named functions spacemacs/window-purpose-{save,restore}-dedicated-windows - Using advice-add globally instead of a define-advice/advice-add mix
Commit f610a48 fixed the usage of `define-advice` in the `spacemacs-purpose` layer functions, but not in the `spacemacs-purpose-popwin` package. The error did not appear before because the package was already installed in `.emacs.d/elpa/...` using the code before the change to define-advice. Once it was reinstalled, the new error started popping up when trying to pop up (sic) a new window. This commit replaces `define-advice` by `advice-add` and only advises the functions once the mode is activated (instead of during package load).
eb36a82 fixes an error that appeared once the If the error persist after integrating these commits, remove the spacemacs-purpose-popwin package from the elpa folder and restart emacs. |
@heartnheart and @cormacc you may want to review your thumbs-up, since there are new commits. |
Hi @sunlin7 !
The followig snippet creates a function named (defun hello () (message "Hello World"))
(define-advice hello (:before (&rest args) before-hello)
(message "before")) The name is optional, though, so it can be used as (define-advice hello (:before (&rest args))
(message "before")) to create an anonymous function. Calling (define-advice hello (:before before-hello)
(message "before"))
(hello) (Also, the function does not have a name, so anywhere expecting to use I could have kept the use of As to why you did not encounter any issue, I'm not sure... Are you using the I'm using emacs 29.3.50 built from sources -- could it be due some version-specific behavior ? |
Btw, the When |
👍 Got the key point, thanks! |
Commit 1ce1b0e introduced a bug due to incorrect usage of define-advice.
This commit refactors the change by: