After exiting `multiple-cursors`, when the previous state is
multiedit{,-insert}, return to normal state.
Use case:
- Mark occurrences with evil-multiedit
- `iedit-switch-to-mc-mode` ("M-M")
- Make some edit
- "C-g" to exit `multiple-cursors`
Expected behaviour: Return to evil's normal-state
Observed behaviour before the patch: Emacs stays on emacs-state
- Remove remaining `EMACS27+` checks, since the whole codebase is
assumed to run at version 27 or above now
- Remove `EMACS27+` definition since it's no longer needed
A call to `format-all--formatter-executable` with the formatter being
equal to `'lsp` or `'eglot` will return `nil`. Therefore, `funcall` was
never called in those cases.
+ Rather than waiting for the first "interactive" major mode to be
visited to activate yas-minor-mode, we wait until the first time the
user invokes a snippet command to activate yas-global-mode.
+ yas-reload-all is one of the bottlenecks when loading a file for the
first time. Deferring it further should help with this.
+ yas-global-mode reaches more major modes than our former list of
hooks (fixes#5140).
Closes#5140
This happened because LSP hooks on kill-buffer-hook (and possibly
others) caused our temporary formatting buffer to talk to LSP as if it
were the original buffer. When the temp buffer was cleaned up, LSP
assumed the original buffer had been closed. No more!
In fact, to avoid similar issues, let's avoid any complex functionality
in hooks in this temp buffer.
This isn't the apheleia rewrite, just a redesign to fix the module's
current issues with its +onsave feature.
+ Rethinks how the formatter dispatches to lsp/eglot's formatter.
+ Stops format-all from being too imposing with its warnings.
+ Relies more on format-all-mode to control formatting-on-save.
+ Sidestep +format-buffer-a hackery when using lsp/eglot formatters.
Fixes#5121Fixes#5128Fixes#5133
The :editor format module uses either the formatter available through an
LSP server or a formatter that the format-all package supports. With
:editor (format +onsave), this formatter is triggered when a file is
saved. However, if no format-all formatter is available, this on-save
behavior is disabled, even if an LSP formatter is available. This fixes
that.
`lispyville-end-of-defun' doesn't go to the next defun when point is
already at the end of a defun, whereas `lispyville-beginning-of-defun'
does. This commit fixes this inconsistency by matching
`lispyville-end-of-defun''s behaviour with `lispyville-beginning-of-defun'.
`line-end-position' isn't enough because it never returns `t' in normal
mode (in normal mode the point can't reach the true end of a line).
Should stop format-all's error from causing trouble in modes that don't
have a registered formatter, like mu4e, org-msg-edit-mode,
org-journal-mode, and others.
Reverts f0eb015
The conflicts are not resolved. This also breaks propagated edits on
visual line + I/A. A more convoluted fix is needed.
Relevant to #2447