-
Notifications
You must be signed in to change notification settings - Fork 79
Cleanup usage of frame parameters #91
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
base: master
Are you sure you want to change the base?
Conversation
| (if (and (persp-curr) (equal name (persp-name (persp-curr)))) name | ||
| (let ((persp (gethash name (perspectives-hash)))) | ||
| (set-frame-parameter nil 'persp--last (persp-curr)) | ||
| (when (and (persp-curr) (not (persp-killed (persp-curr)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not (persp-killed (persp-curr))) makes the persp-let-frame-parameters in persp-kill unnecessary.
| "Preserve the current perspective when entering a recursive edit." | ||
| (persp-protect | ||
| (persp-save) | ||
| (persp-let-frame-parameters ((persp--recursive (persp-curr))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this persp-let-frame-parameters since its usage is simple enough that we can just expand out what its doing.
|
This is something that I've had in my local copy of |
|
This is really interesting, thanks! I'll need more time to think about this patch. There's an argument for eliminating frame parameters for maintaining perspective state altogether. In any case, I'd like to merge a few other PRs before this one and deal with potential conflicts in that order. |
|
Yes, I saw your comment in #90 which is why I thought it was the right time to make a pull request since it would make that transition extremely simple. |
The main change of this pull request is to hide all modification of frame parameters behind the
setfmacro. So that instead of having(set-frame-parameter nil 'persp-foo ...)we have(setf (persp-foo) ...). It also adds optionalframearguments to a few functions to avoid the use ofwith-selected-frameand also removespersp-let-frame-parametersas it seemed unnecessary.