| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Co-authored-by: Tom Dalziel <tom_dl@hotmail.com>
|
|
|
|
|
|
|
|
|
|
Co-authored-by: Tom Dalziel <tom_dl@hotmail.com>
|
|
Add `evil--jumps-current-file-name` that returns `default-directory`
in `evil--jumps-push` when dired-mode is active. The
`dired-directory` can be properly re-opened by `find-file` called by
future evil-jump-backward or evil-jump-forward.
|
|
|
|
|
|
|
|
|
|
The function calc-eval is autoloaded so there is no need to eagerly
require it.
|
|
This ensures that the input method after deactivating evil-local-mode is
the same as the input method used for states with a non-nil
:input-method property.
This issue was discovered while investigating why the input method
couldn't be set by the agda2-mode while evil was active [1]. As the
change in major mode (to agda2-mode) caused evil-local-mode to be
disabled and reenabled by `define-globalized-minor-mode evil-mode`, the
input method was lost because the default state (i.e. normal state) does
have an :input-method property of nil.
In summary this patch fixes the approach used by agda2-mode [2] and the
official recommendation in the Emacs manual [3], e.g.
(add-hook 'text-mode-hook
(lambda () (set-input-method "german-prefix")))
[1]: https://github.com/agda/agda/issues/2141
[2]: https://github.com/agda/agda/blob/37554c46cbd770fa630f9b164e2b543506acbdbc/src/data/emacs-mode/agda2-mode.el#L432
[3]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Select-Input-Method.html
|
|
The test was passing when run on text terminals but not on graphical
terminals. This was because in TUIs, wrapping is indicated by a
backslash that counts toward the width returned by window-width, but in
GUIs a bent arrow (↩) is placed in the fringe instead, so one more
character was needed in order to display a continuation line.
|
|
With the Evil repeat system now aware of read-key, there is no need for
the digraph repeat workaround introduced by commit
dba2fa9907cf096f5e615df2e8b0381b643d47ee.
|
|
|
|
|
|
This fixes #1481.
Also pass along the number of the current replacement to function called
to generate each replacement, which fixes #1411.
|
|
With lexical binding it is possible to close over the list of Ex
commands, instead of recomputing it on every keystroke while completing.
Also, there is no need to call evil-ex-command-force-p on the command
string, which uses try-completion, since the command functions are known
as the evil-ex-commands alist values.
|
|
This commit reworks the function evil-parser into a macro that in turn
expands to a parser.
Some features that were not utilized have been dropped:
* The GREEDY flag allowed backtracking to kick in instead of reporting
an incomplete match. However the rules in cases where they are not
deterministic are already listed in order of longest first.
Lookaheads can still be used for this purpose.
* Parsing is now always whitespace insensitive, but this is reversible
without any hassle.
* String replacement semantic actions.
* (+ ...) rules no longer implicitly use seq.
* Computation of the syntax tree has been deferred until when
completion is requested.
|
|
|
|
|
|
|
|
Fixes #1761
|
|
Previously if a character was overwritten many times from Replace state,
backspacing over it would restore it to its original value, unlike in
Vim.
|
|
The implementation of evil-track-last-insertion introduced in commit
477fe8e83e58739215ea3b601098ee134484114f assumed that all relevant
changes look like atomic insertions/deletions, but e.g.
remove-yank-excluded-properties upon yanking causes a single
substitution change. This commit fixes that.
A change not centered around the end of the previous insertion is also
made to start a new range, like in Vim.
Fixes #1759
|
|
All current uses of evil-sort only pass two arguments, for which a
conditional swap suffices.
Also replace the implementation of evil-swap with cl-rotatef, since that
is built-in and produces marginally better code for three or more
variables.
|
|
This fixes a regression caused by commit 29a5d464e973b66abae20e6c4b402a366547c7a5.
Resolves #1756
|
|
Co-authored-by: Axel Forsman <axelsfor@gmail.com>
|
|
It was removed by commit 29a5d464e973b66abae20e6c4b402a366547c7a5,
however this broke the evil-surround package.
|
|
Changing to Operator-pending state before executing
(evil-extract-count (this-command-keys))
can give the wrong result since the actual binding used to invoke the
operator may not be present in the new state.
Resolves #1073
|
|
|
|
This commit fixes a regression caused by #1549 where you could no longer
give a prefix argument to execute the macro in an infinite loop.
|
|
This fixes the issue of the evil-send-(local-)leader commands being
recognized as the motion while in Operator-pending state. Additionally,
describe-key (C-h k) can now be used to lookup keybindings using leader.
Note that simply binding [(local-)leader] keyboard macros would not
work, since then the command would not receive the prefix argument.
Closes #1711
|
|
The predicate (listp state) is true also for the value nil of state,
meaning the correct clause with all-states was never considered.
Closes #1383
|
|
This commit fixes some issues surrounding the initialization of Evil.
First of all, since GNU Emacs 26.1 major mode hooks actually do run in
Fundamental mode buffers. In any case, manually enabling
fundamental-mode correctly instead of turn-on-evil-mode (by setting
major-mode default) successfully enables evil-local-mode, as major mode
hooks then run. The major-mode variable also never needed to be reset;
it is the job of the major mode to set it, as it starts off as
fundamental-mode regardless of its default value.
Secondly, while some hooks and variables set up by evil-local-mode were
marked as permanent, this did not matter as evil-initialize
unconditionally reinitialized evil-local-mode whenever the major mode
changed. Fixed by marking them all as permanent and not executing
evil-local-mode if it is already enabled.
Closes #1268, closes #1561
|
|
`evil-jump-item' internally calls `evil-looking-at-start-comment', which
fails at `point-max' because it checks `char-after' using `char-syntax'. Return
nil in it if `point' = `point-max', because a comment cannot start at the end of
the buffer (it would be 0 characters long).
|
|
Co-authored-by: Axel Forsman <axelsfor@gmail.com>
|
|
Instead of positioning the point and narrowing correctly for the
entirety of show-paren-function, just do it for the
show-paren-data-function call. This avoids duplicating the logic for
removing stale overlays, which had to support both the new and old names
of the once renamed show-paren--overlay variables.
Not narrowing during show-paren-function also fixes an issue with the
"mixed" show-paren-style, which uses pos-visible-in-window-p, see #1739.
Closes #1739
|
|
Use the function window-swap-states added in GNU Emacs 26.1 when
available. Also leave the correct window selected, i.e. not the window
that was originally selected.
Closes #338
|
|
This matches the behavior of Vim in how repeated macros are aborted.
|
|
The built-in functions scroll-up/-down already support optionally
preserving the cursor screen position while scrolling via CTRL-U and
CTRL-D. This makes it unnecessary to do it manually through
(let ((xy (evil-posn-x-y (posn-at-point))))
...
(goto-char (posn-point (posn-at-x-y (car xy) (cdr xy)))))
|
|
Closes #1277
|
|
Searching through the results of overlays-in, in addition to looping
with next-overlay-change/overlays-at, is essentially doing the same work
twice. This commit opts for only doing the latter.
In addition, some other fixes are
* Avoid requiring flyspell.
* Fail immediately if no spelling error was found regardless of count,
and signal error in that case so that macros are aborted like in Vim.
* Echo a notice when search wrapped around.
* Make "[s" and "s]" push the previous position onto the jump list.
* Run tests when suitable spell checker other than aspell is available.
|
|
Addresses #1074
- evil-with-undo:
nconc'ing onto front of buffer-undo-list here can corrupt buffer-undo-list
when in undo-tree-mode in rare circumstances (see issue #1074). Leave
standard undo machinery to work as usual when undo is enabled. Deal with
disabled undo by temporarily enabling then disabling undo, and transferring
any undo changes to evil-temporary-undo.
- evil-undo-pop:
This function called `undo' directly from Elisp, which is wrong when in
undo-tree-mode. Fix this by calling undo-tree-undo instead when in
undo-tree-mode.
Co-authored-by: Axel Forsman <axelsfor@gmail.com>
|
|
|
|
|