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

Refactor app state into a struct #6

Merged
merged 1 commit into from
Feb 16, 2021

Conversation

hlissner
Copy link
Contributor

What changed:
All emacs-everywhere's buffer-local state has been compressed into an emacs-everywhere-app-info struct, stored in the buffer-local variable emacs-everywhere-current-app (which is given the permanent-local property so its value isn't killed when the major mode is changed).

Also, since the app name is the app's identifier on macOS, it is now used as its emacs-everywhere-app-id, rather than leaving it nil.

Why:

  1. It makes it a little easier to juggle this state across the various init and finish hooks, and to clean up (in a later PR).
  2. Makes it easier to prevent some type errors and loss of data when changing major modes (possibly fixing Error when trying to write in apps #3).
  3. This is the first step toward a larger PR to make emacs-everywhere use Emacs' built-in server machinary for frame life-cycle management, to reduce redundant work and opens up emacs-everywhere for use with browsers or apps with direct EDITOR support, like qutebrowser.

@tecosaur tecosaur merged commit c6ffbb2 into tecosaur:master Feb 16, 2021
@hlissner hlissner deleted the refactor-app-info branch February 24, 2021 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants