Draft
Conversation
a8916aa to
1754b21
Compare
cbd02ea to
1305317
Compare
465952c to
586c29d
Compare
Merged
586c29d to
d6770bd
Compare
d6770bd to
76895d8
Compare
d97cd65 to
93b92cd
Compare
ed6adac to
d5cfe10
Compare
7876af5 to
f79c6a2
Compare
- Delete lean4-info-toggle. - In lean4-mode-map, bind C-c C-i to lean4-info-mode instead. - Adapt readme and manuals. - Move lean4-hooks-alist from lean4-mode.el to lean4-info-hookings and deal with it in lean4-info-mode.
The lean4-mode-setup function was almost empty. The only thing it was doing is to set flycheck-disabled-checkers to nil buffer-locally. But after testing, this setting is the default / initial value already and thus not needed.
Even if compilation-mode-font-lock-keywords should be nil when `compile` is called from Lean4-Mode due to the way Lake's or Lean's build log looks, this doesn't justify globally setting compilation-mode-font-lock-keywords to nil because this screws up `compile` for the Emacs session permanently.
1. Built-ins 2. Third-party (any Elpa) 3. Local (lean4-*)
Citing Wikipedia <https://en.wikipedia.org/wiki/All_rights_reserved>: “The requirement to add the "all rights reserved" notice became essentially obsolete on August 23, 2000, when Nicaragua became the final member of the Buenos Aires Convention to also become a signatory to the Berne Convention. As of that date, every country that was a member of the Buenos Aires Convention (which is the only copyright treaty requiring this notice to be used) was also a member of Berne, which requires protection be granted without any formality of notice of copyright.”
- Rephrase some comments - Reduce multiple consecutive blank lines to single blank lines - Avoid exceeding fill-column with comments - Use `;;;;* ` prefix for outline/heading comments (for code navigation)
- Fixes issue #101 “Document the pitfall of modifying lean4-mode-hook before Lean4-Mode has been loaded”.
c68cd95 to
cca95cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
Let's first set up the Changelog so that later commits can keep it updated.
Delete obsolete code
First of all, we delete code, so that we don't waste time fixing obsolete code.
Following files were already independently deleted by Yury on the master branch:
-debug-devFeatures and other code:
lean4-input-export-translationsandlean4-input-export-translations-to-stdoutfunction definitions from-inputfile because it'd be a waste of time as later milestones/PRs will reimplement-input. See: Rework Abbreviations for Input Method #93.)And, at least temporarily:
-utiland-lakefiles in favor of a minimalist approach for locating thelakeandleanbinaries as well as the project root (Removelean4-lake.elin favor of Emacs built-incompilecommand #90, Refactor lake find dir #100)Separate concerns
We separate concerns, i.e. we move definitions of functions and variables as well as other code to those files where they belong, so that we don't keep stumbling upon our own feet but rather have a nice and tidy code base, in particular for later PRs.
Delete
-settingsfile after moving following out of it:-mode-show-file-progressto-fringe-highlight-inaccessible-namesto-info-modeMove following code out of
-modefile:-tab-indentto-eri-inputmarkdown-code-lang-modesto new-markdown-lsp-flycheckmakes sense. No, it doesn't.Rename variables and functions such that they use the prefix of the file
where they are defined:
-lsp-input-eri-infoNote that we do not rename
-infofile to-lsp-info, even though Lean4 Info currently only works for lsp-mode, as we hope that it might perhaps eventually also work with Eglot.Minor mode
lean4-info-modelean4-info-modeMinor mode
lean4-lsp-modeWe separate logic relating Lean4-Mode to lsp-mode into a new minor mode. This lays the ground for later PRs that'd provide alternative minor modes for using alternative LSP clients, like Eglot.
lean4-lsp-modelean4-lsp-mode-mapRefactor Lean4-Mode
lean4-hooks-alistwith entries inlean4-mode-hooklean4-mode-setupwith entries inlean4-mode-hooklean4-modedefinition by usingsetq-localand with entries inlean4-mode-hookGlobally consistent patterns
We consistently implement repository-wide code patterns and conventions. We do so near the end of the PR in order to reduce chances for merge conflicts when reordering commits within this PR's branch.
Consistently use Lean4 name across project:
Other:
require(1. built-ins, 2. third-party, 3. local)Improve documentation and formalia
Reformat Package-Requires library header.Won't do this because of incompatibility with Melpazoid.In readme/manual:
lean4-mode-hook(Document the pitfall of modifyinglean4-mode-hookbefore Lean4-Mode has been loaded #101)lean4-modeand describe how to explicitly autoload. (lean4-modeis not automatically activated by.leanfiles using README instructions #103)lean-mode)