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

Use run-mode-hooks to trigger extra major-mode hooks #67

Closed
wants to merge 1 commit into from

Conversation

bltavares
Copy link

Instead of using define-derived-mode to declare the dart-mode, there is a function to setup the mode manually.

This causes other packages to not be able to detect major mode changes, as the change-major-mode-after-body-hook and after-change-major-mode-hook are not being triggered.

This PR replaces run-hooks with run-mode-hooks to trigger the extra hooks when changing a major mode.

Similar to:

Instead of using `define-derived-mode` to declare the `dart-mode`, there is a function to setup the mode manually.

This causes other packages to not be able to detect major mode changes, as the `change-major-mode-after-body-hook` and `after-change-major-mode-hook` are not being triggered.

This PR replaces `run-hooks` with `run-mode-hooks` to trigger the extra hooks when changing a major mode. 

### Similar to:
- syl20bnr/spacemacs#7111
- skeeto/elfeed#214
- Fixes syl20bnr/spacemacs#8333
bltavares added a commit to bltavares/spacemacs that referenced this pull request Sep 4, 2018
This is a initial implementation of a Dart later.
A [previous implementation] has been deprecated, using a forked version of `dart-mode`.

This layer uses the [dart-mode] linked on the [Dart tools] page.
The layer works with a Flutter installation as well.

Ideally, we would be able to offer a `lsp` backend as an option to use, instead
of using the Dart Analyzer, but I'm still figuring out how to implement and
integrate this.

This layer has [some] [fixes] to make it work, and it is waiting for upstream to
take patches.

- Resolves syl20bnr#8333
- Resolves syl20bnr#8395
- Resolves syl20bnr#10452

---
[previous implementation]: syl20bnr#8406
[dart-mode]: https://github.com/bradyt/dart-mode
[Dart tools]: https://www.dartlang.org/tools
[some]: emacsorphanage/dart-mode#67
[fixes]: emacsorphanage/dart-mode#66
bltavares added a commit to bltavares/spacemacs that referenced this pull request Sep 4, 2018
This is a initial implementation of a Dart later.
A [previous implementation] has been deprecated, using a forked version of `dart-mode`.

This layer uses the [dart-mode] linked on the [Dart tools] page.
The layer works with a Flutter installation as well.

Ideally, we would be able to offer a `lsp` backend as an option to use, instead
of using the Dart Analyzer, but I'm still figuring out how to implement and
integrate this.

This layer has [some] [fixes] to make it work, and it is waiting for upstream to
take patches.

- Resolves syl20bnr#8333
- Resolves syl20bnr#8395
- Resolves syl20bnr#10452

---
[previous implementation]: syl20bnr#8406
[dart-mode]: https://github.com/bradyt/dart-mode
[Dart tools]: https://www.dartlang.org/tools
[some]: emacsorphanage/dart-mode#67
[fixes]: emacsorphanage/dart-mode#66
bltavares added a commit to bltavares/spacemacs that referenced this pull request Sep 4, 2018
This is a initial implementation of a Dart later.
A [previous implementation] has been deprecated, using a forked version of `dart-mode`.

This layer uses the [dart-mode] linked on the [Dart tools] page.
The layer works with a Flutter installation as well.

Ideally, we would be able to offer a `lsp` backend as an option to use, instead
of using the Dart Analyzer, but I'm still figuring out how to implement and
integrate this.

This layer has [some] [fixes] to make it work, and it is waiting for upstream to
take patches.

- Resolves syl20bnr#8333
- Resolves syl20bnr#8395
- Resolves syl20bnr#10452

---
[previous implementation]: syl20bnr#8406
[dart-mode]: https://github.com/bradyt/dart-mode
[Dart tools]: https://www.dartlang.org/tools
[some]: emacsorphanage/dart-mode#67
[fixes]: emacsorphanage/dart-mode#66
bltavares added a commit to bltavares/spacemacs that referenced this pull request Sep 4, 2018
This is a initial implementation of a Dart later.
A [previous implementation] has been deprecated, using a forked version of `dart-mode`.

This layer uses the [dart-mode] linked on the [Dart tools] page.
The layer works with a Flutter installation as well.

Ideally, we would be able to offer a `lsp` backend as an option to use, instead
of using the Dart Analyzer, but I'm still figuring out how to implement and
integrate this.

This layer has [some] [fixes] to make it work, and it is waiting for upstream to
take patches.

- Resolves syl20bnr#8333
- Resolves syl20bnr#8395
- Resolves syl20bnr#10452

---
[previous implementation]: syl20bnr#8406
[dart-mode]: https://github.com/bradyt/dart-mode
[Dart tools]: https://www.dartlang.org/tools
[some]: emacsorphanage/dart-mode#67
[fixes]: emacsorphanage/dart-mode#66
bltavares added a commit to bltavares/spacemacs that referenced this pull request Sep 4, 2018
This is a initial implementation of a Dart later.
A [previous implementation] has been deprecated, using a forked version of `dart-mode`.

This layer uses the [dart-mode] linked on the [Dart tools] page.
The layer works with a Flutter installation as well.

Ideally, we would be able to offer a `lsp` backend as an option to use, instead
of using the Dart Analyzer, but I'm still figuring out how to implement and
integrate this.

This layer has [some] [fixes] to make it work, and it is waiting for upstream to
take patches.

- Resolves syl20bnr#8333
- Resolves syl20bnr#8395
- Resolves syl20bnr#10452

---
[previous implementation]: syl20bnr#8406
[dart-mode]: https://github.com/bradyt/dart-mode
[Dart tools]: https://www.dartlang.org/tools
[some]: emacsorphanage/dart-mode#67
[fixes]: emacsorphanage/dart-mode#66
bltavares added a commit to bltavares/spacemacs that referenced this pull request Sep 4, 2018
This is a initial implementation of a Dart later.
A [previous implementation] has been deprecated, using a forked version of `dart-mode`.

This layer uses the [dart-mode] linked on the [Dart tools] page.
The layer works with a Flutter installation as well.

Ideally, we would be able to offer a `lsp` backend as an option to use, instead
of using the Dart Analyzer, but I'm still figuring out how to implement and
integrate this.

This layer has [some] [fixes] to make it work, and it is waiting for upstream to
take patches.

- Resolves syl20bnr#8333
- Resolves syl20bnr#8395
- Resolves syl20bnr#10452

---
[previous implementation]: syl20bnr#8406
[dart-mode]: https://github.com/bradyt/dart-mode
[Dart tools]: https://www.dartlang.org/tools
[some]: emacsorphanage/dart-mode#67
[fixes]: emacsorphanage/dart-mode#66
@bltavares
Copy link
Author

Looking at the test failures, this seems to be related with #35 but works for Dart stable

@bradyt
Copy link
Collaborator

bradyt commented Dec 15, 2018

@bltavares the project now uses define-derived-mode, is the issue resolved?

@bradyt
Copy link
Collaborator

bradyt commented Dec 17, 2018

Closed as issue may be resolved, and it's not clear to me how to reproduce.

@bradyt bradyt closed this Dec 17, 2018
@bltavares
Copy link
Author

Hi there @bradyt. Using define-derived-mode indeed resolves the issues.

Thank you.

@bltavares bltavares deleted the patch-1 branch December 17, 2018 16:16
@bradyt
Copy link
Collaborator

bradyt commented Dec 17, 2018

Great, thank you for confirming!

bltavares added a commit to bltavares/spacemacs that referenced this pull request Dec 17, 2018
This is a initial implementation of a Dart later.
A [previous implementation] has been deprecated, using a forked version of `dart-mode`.

This layer uses the [dart-mode] linked on the [Dart tools] page.
The layer works with a Flutter installation as well.

Ideally, we would be able to offer a `lsp` backend as an option to use, instead
of using the Dart Analyzer, but I'm still figuring out how to implement and
integrate this.

This layer has [some] [fixes] to make it work, and it is waiting for upstream to
take patches.

- Resolves syl20bnr#8333
- Resolves syl20bnr#8395
- Resolves syl20bnr#10452

---
[previous implementation]: syl20bnr#8406
[dart-mode]: https://github.com/bradyt/dart-mode
[Dart tools]: https://www.dartlang.org/tools
[some]: emacsorphanage/dart-mode#67
[fixes]: emacsorphanage/dart-mode#66
duianto pushed a commit to syl20bnr/spacemacs that referenced this pull request Apr 12, 2019
This is a initial implementation of a Dart later.
A [previous implementation] has been deprecated, using a forked version of `dart-mode`.

This layer uses the [dart-mode] linked on the [Dart tools] page.
The layer works with a Flutter installation as well.

Ideally, we would be able to offer a `lsp` backend as an option to use, instead
of using the Dart Analyzer, but I'm still figuring out how to implement and
integrate this.

This layer has [some] [fixes] to make it work, and it is waiting for upstream to
take patches.

- Resolves #8333
- Resolves #8395
- Resolves #10452

---
[previous implementation]: #8406
[dart-mode]: https://github.com/bradyt/dart-mode
[Dart tools]: https://www.dartlang.org/tools
[some]: emacsorphanage/dart-mode#67
[fixes]: emacsorphanage/dart-mode#66
billy1kaplan pushed a commit to billy1kaplan/spacemacs that referenced this pull request Apr 19, 2019
This is a initial implementation of a Dart later.
A [previous implementation] has been deprecated, using a forked version of `dart-mode`.

This layer uses the [dart-mode] linked on the [Dart tools] page.
The layer works with a Flutter installation as well.

Ideally, we would be able to offer a `lsp` backend as an option to use, instead
of using the Dart Analyzer, but I'm still figuring out how to implement and
integrate this.

This layer has [some] [fixes] to make it work, and it is waiting for upstream to
take patches.

- Resolves syl20bnr#8333
- Resolves syl20bnr#8395
- Resolves syl20bnr#10452

---
[previous implementation]: syl20bnr#8406
[dart-mode]: https://github.com/bradyt/dart-mode
[Dart tools]: https://www.dartlang.org/tools
[some]: emacsorphanage/dart-mode#67
[fixes]: emacsorphanage/dart-mode#66
thomasheartman pushed a commit to thomasheartman/.emacs.d that referenced this pull request Jul 6, 2019
This is a initial implementation of a Dart later.
A [previous implementation] has been deprecated, using a forked version of `dart-mode`.

This layer uses the [dart-mode] linked on the [Dart tools] page.
The layer works with a Flutter installation as well.

Ideally, we would be able to offer a `lsp` backend as an option to use, instead
of using the Dart Analyzer, but I'm still figuring out how to implement and
integrate this.

This layer has [some] [fixes] to make it work, and it is waiting for upstream to
take patches.

- Resolves syl20bnr/spacemacs#8333
- Resolves syl20bnr/spacemacs#8395
- Resolves syl20bnr/spacemacs#10452

---
[previous implementation]: syl20bnr/spacemacs#8406
[dart-mode]: https://github.com/bradyt/dart-mode
[Dart tools]: https://www.dartlang.org/tools
[some]: emacsorphanage/dart-mode#67
[fixes]: emacsorphanage/dart-mode#66
stephanschubert pushed a commit to stephanschubert/spacemacs that referenced this pull request Oct 23, 2019
This is a initial implementation of a Dart later.
A [previous implementation] has been deprecated, using a forked version of `dart-mode`.

This layer uses the [dart-mode] linked on the [Dart tools] page.
The layer works with a Flutter installation as well.

Ideally, we would be able to offer a `lsp` backend as an option to use, instead
of using the Dart Analyzer, but I'm still figuring out how to implement and
integrate this.

This layer has [some] [fixes] to make it work, and it is waiting for upstream to
take patches.

- Resolves syl20bnr#8333
- Resolves syl20bnr#8395
- Resolves syl20bnr#10452

---
[previous implementation]: syl20bnr#8406
[dart-mode]: https://github.com/bradyt/dart-mode
[Dart tools]: https://www.dartlang.org/tools
[some]: emacsorphanage/dart-mode#67
[fixes]: emacsorphanage/dart-mode#66
sei40kr pushed a commit to sei40kr/spacemacs that referenced this pull request Nov 11, 2019
This is a initial implementation of a Dart later.
A [previous implementation] has been deprecated, using a forked version of `dart-mode`.

This layer uses the [dart-mode] linked on the [Dart tools] page.
The layer works with a Flutter installation as well.

Ideally, we would be able to offer a `lsp` backend as an option to use, instead
of using the Dart Analyzer, but I'm still figuring out how to implement and
integrate this.

This layer has [some] [fixes] to make it work, and it is waiting for upstream to
take patches.

- Resolves syl20bnr#8333
- Resolves syl20bnr#8395
- Resolves syl20bnr#10452

---
[previous implementation]: syl20bnr#8406
[dart-mode]: https://github.com/bradyt/dart-mode
[Dart tools]: https://www.dartlang.org/tools
[some]: emacsorphanage/dart-mode#67
[fixes]: emacsorphanage/dart-mode#66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Unstable declare-prefix-for-mode
2 participants