| Age | Commit message (Collapse) | Author |
|
|
|
Normal mode "g$" put the cursor on the start of the next visual line
instead of the end of the current one.
Fixes #1244, fixes #1963
|
|
* evil-common.el (evil-with-delay): Add comment for last change.
* evil-macros.el (font-lock-add-keywords): Use the font-lock faces
rather than their obsolete variables.
* evil-ex.el (evil-ex-define-argument-type): Make sure the function
arguments can be compiled.
(evil-ex-init-shell-argument-completion): Don't let-bind
`completion-at-point-functions` because hooks aren't just variables.
|
|
When in the point is on a blank line in normal state, scrolling down
with `pixel-scroll-precision-mode` enabled "sticks" because Evil ends up
invoking `line-move` in the `post-command-hook`. `line-move` resets
vscroll to 0, which undoes the scroll if we scrolled less than a line.
Specifically, `evil-normal-post-command` calls `evil-adjust-cursor`
which calls `evil-move-end-of-line` which calls `move-end-of-line`,
which finally calls `line-move`.
This change avoids this issue by removing the call to `evil-move-end-of-line`
entirely, instead relying on the `bolp` call in `evil-move-cursor-back`.
|
|
|
|
|
|
Fixes #1895
|
|
|
|
There already exists a method for sticking to EOL: Setting
temporary-goal-column to most-positive-fixnum. As such, there is no
need for the variable evil--visual-eol-anchored introduced by commit
e31bff8cb64d773bbfd9a8e326db8645eaee43fd.
This commit also fixes a regression where "g$" made "gj"/"gk" stick to
visual EOLs.
|
|
Also fixes #1876
|
|
|
|
|
|
|
|
|
|
If dynamic binding is used when expanding the macro, then the function
will not capture fun-name as a closure. Fix this by using
apply-partially which is defined in a source file that uses lexical
binding.
|
|
|
|
This commit makes evil-with-delay generated code work using a single
lambda that returns the result of condition, running body if non-nil.
This way the byte compiler sees that body is guarded by condition,
which fixes the FIXME.
|
|
Save some kittens by using a macro instead of using `eval`.
This also exposes more code to the compiler, so should result in
more efficient code and potentially better compiler warnings.
* evil-common.el (evil-unquote): Delete unused function.
(evil--with-delay): New function, extracted from `evil-delay`.
(evil-with-delay): New macro, extracted from `evil-delay`.
(evil-delay): Redefine using `evil-with-delay` and declare obsolete.
* evil-states.el (evil-visual-activate-hook):
* evil-core.el (evil-define-key):
* evil-commands.el (evil-execute-in-normal-state): Use `evil-with-delay`.
|
|
The function evil-visual-paste would assign to evil-visual-point/-mark
the same markers used by the '[ and '] marks. Therefore, after a
single visual paste Normal mode "gv" would act funkily in that buffer
ever after. To reproduce:
* Enter a new buffer with the contents:
x
y
* With the cursor on "x", type "ylvpjxgv".
The expectation is that "x" should be re-selected. Instead the empty
lower line is selected due to it being the previously changed text.
This commit fixes this, and also removes unused definitions related to
evil-visual-previous-point/-mark.
|
|
Most of the code already used lexical-binding, but there were
still a few of remnant of use of the old dynbound dialect.
* evil-tests.el: Activate `lexical-binding`.
(evil-test-change-state): Initialize the local vars immediately rather
than as a separate step. Remove unused vars `keymap` and `local-keymap`.
(evil-test-auxiliary-maps): Rename local var to `evil--map` and declare
it dynbound since we need `evil-define-key` to have access to it.
(evil-test-exclusive-type): Remove unused var `third`.
(evil-test-text-object): Mark unused var `type`.
(evil-with-both-search-modules): Move before first use.
(evil-test-properties): Rename local var to `evil--alist` and declare
it dynbound since we need `evil-put-property` to have access to it.
* evil.el: Activate `lexical-binding`.
* evil-types.el ("<addr>"):
* evil-common.el (evil--eval-expr):
* evil-commands.el (evil-ex-global): Tell `eval` to use the lexbind
dialect of ELisp.
|
|
Some of these commits can be almost immediately restored,
once the time is found to do so.
Revert "Fix evil-with-delay with dynamic binding"
This reverts commit 1e9b2434264529fe0dd964b68fe89236a4abeac3.
Revert "Some cleanups"
This reverts commit 0cbd61f2de104fab16602d0418605cd0513b16f3.
Revert "Misc minor changes"
This reverts commit b291039b0c6ffc3b2f3c9f02b8ad2f0041127b12.
Revert "Merge evil-with-delay condition and body lambdas"
This reverts commit 1b56ffcc102b4c5f8b015e760b5f9cf5932622af.
Revert "(evil-with-delay): New macro, extracted from `evil-delay`"
This reverts commit 3d7faadf30016a8c20699a5fb1b5731b8a49dcd2.
Revert "Make evil-search-wrap-ring-bell work with evil-search"
This reverts commit 5e72cf5b6d57b785ea229236bb5c4638db2c9a05.
Revert "Stop the '</'> and '[/'] marks from intertwining"
This reverts commit 26db9441a13ebedb2481d7ada4c3b5e60ec22795.
Revert "Remove redundant `:group` args"
This reverts commit 6e30037fdc6a275d78d6b82d89bd8e47bcf4d4e3.
Revert "Avoid eval in evil-test-buffer"
This reverts commit 27d81ad406d2d3e07591b927357d2354ef5b5c65.
Revert "Use lexical-binding everywhere"
This reverts commit 44c7f301468c264a781be4ee8ae879fe1b457e60.
|
|
If dynamic binding is used when expanding the macro, then the function
will not capture fun-name as a closure. Fix this by using
apply-partially which is defined in a source file that uses lexical
binding.
|
|
|
|
This commit makes evil-with-delay generated code work using a single
lambda that returns the result of condition, running body if non-nil.
This way the byte compiler sees that body is guarded by condition,
which fixes the FIXME.
|
|
Save some kittens by using a macro instead of using `eval`.
This also exposes more code to the compiler, so should result in
more efficient code and potentially better compiler warnings.
* evil-common.el (evil-unquote): Delete unused function.
(evil--with-delay): New function, extracted from `evil-delay`.
(evil-with-delay): New macro, extracted from `evil-delay`.
(evil-delay): Redefine using `evil-with-delay` and declare obsolete.
* evil-states.el (evil-visual-activate-hook):
* evil-core.el (evil-define-key):
* evil-commands.el (evil-execute-in-normal-state): Use `evil-with-delay`.
|
|
The function evil-visual-paste would assign to evil-visual-point/-mark
the same markers used by the '[ and '] marks. Therefore, after a
single visual paste Normal mode "gv" would act funkily in that buffer
ever after. To reproduce:
* Enter a new buffer with the contents:
x
y
* With the cursor on "x", type "ylvpjxgv".
The expectation is that "x" should be re-selected. Instead the empty
lower line is selected due to it being the previously changed text.
This commit fixes this, and also removes unused definitions related to
evil-visual-previous-point/-mark.
|
|
Most of the code already used lexical-binding, but there were
still a few of remnant of use of the old dynbound dialect.
* evil-tests.el: Activate `lexical-binding`.
(evil-test-change-state): Initialize the local vars immediately rather
than as a separate step. Remove unused vars `keymap` and `local-keymap`.
(evil-test-auxiliary-maps): Rename local var to `evil--map` and declare
it dynbound since we need `evil-define-key` to have access to it.
(evil-test-exclusive-type): Remove unused var `third`.
(evil-test-text-object): Mark unused var `type`.
(evil-with-both-search-modules): Move before first use.
(evil-test-properties): Rename local var to `evil--alist` and declare
it dynbound since we need `evil-put-property` to have access to it.
* evil.el: Activate `lexical-binding`.
* evil-types.el ("<addr>"):
* evil-common.el (evil--eval-expr):
* evil-commands.el (evil-ex-global): Tell `eval` to use the lexbind
dialect of ELisp.
|
|
Fixes part of #1815
|
|
|
|
Also try and make the docstring fit within 80 columns.
This fixes some incorrect uses and eliminates some warnings.
|
|
|
|
This is a proper fix for #569 instead of commit
ab0f6a546e6c703cd8d3c0d7c1035196b0455c45, which simply aborted the Ex
command line upon it being unfocused. Apart from disallowing recursive
editing, that also made debugging Ex errors impossible.
The core issue was that evil-ex-current-buffer had a dual purpose:
(I) While in the minibuffer, it stored the original buffer the Ex
command would eventually act on, and was used for special registers
and some argument handlers; and (II) While executing an Ex command it
was non-nil, which signified that commands should use the variables
evil-ex-range, evil-ex-bang and evil-ex-argument set by
evil-ex-call-command, instead of, say, prompting for a motion.
However, during recursive editing due to (I) evil-ex-current-buffer
was dynamically let-bound, triggering the special behavior in (II),
meaning all operators always worked on the evil-line motion, i.a.
Fix this by, for (I), only setting evil-ex-current-buffer
buffer-locally in the Ex minibuffer, renaming it to
evil-ex-original-buffer (similar to minibuffer--original-buffer), and
for (II) instead introducing evil-called-from-ex-p which is set to t
solely during evil-ex-call-command.
Closes #1415, by only making use of the return value of
minibuffer-selected-window where required.
|
|
When lexing a string with string-match and its START argument, there
is no way to anchor matches to the START position. Instead, one must
either allocate substrings - as done prior to commit
56b43b6f7e014e905f85df1c542c67f46ea99566 - or use looking-at etc.,
instead. This commit opts for the latter.
The Ex completion-at-point functions are also rewritten in order to
avoid having to add ex-index text properties to the command string,
since evil--ex-syntactic-context could be extended to provide that
information just as easily.
|
|
|
|
Closes #1803
|
|
|
|
|
|
Also replace a few calls to evil-filter-list that destructively
modified user-provided lists with cl-remove-if.
|
|
* Deprecate evil-loop since it is too niche, and manages makes
evil-motion-loop less readable.
* Use separate setq-local calls for each variable/value pair, since
the combined form does not exist in Emacs versions <=25.3.
|
|
|
|
|
|
The function calc-eval is autoloaded so there is no need to eagerly
require it.
|
|
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.
|
|
|
|
|
|
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.
|
|
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
|