diff options
| author | Axel Forsman <axelsfor@gmail.com> | 2022-11-30 10:23:26 +0100 |
|---|---|---|
| committer | Tom Dalziel <33435574+tomdl89@users.noreply.github.com> | 2022-12-29 17:38:43 +0000 |
| commit | 1226944a5d7a409400394e34b673e57544bb8abb (patch) | |
| tree | b00455a1cfe370ccfc23c551168d2847bf2bdfa3 /evil-states.el | |
| parent | e2ec733b056c27f0d6c819e6bf6adbbdc0ef8316 (diff) | |
Remove some unnecessary evil-normalize-position:s
All Emacs functions that take positions as arguments such as goto-char
already do the normalization performed by evil-normalize-position. The
only case where it would be necessary is when a marker that may be
mutated is stored. Therefore it would probably be a good idea to replace
evil-normalize-position with conditional marker-position altogether.
Diffstat (limited to 'evil-states.el')
| -rw-r--r-- | evil-states.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/evil-states.el b/evil-states.el index 2bdf015..05f46a5 100644 --- a/evil-states.el +++ b/evil-states.el @@ -500,14 +500,12 @@ mark and point, use `evil-visual-select' instead." If TYPE is given, also set the Visual type. If MESSAGE is given, display it in the echo area." (interactive) - (let* ((point (evil-normalize-position - (or point (point)))) - (mark (evil-normalize-position - (or mark - (when (or (evil-visual-state-p) - (region-active-p)) - (mark t)) - point)))) + (let* ((point (or point (point))) + (mark (or mark + (when (or (evil-visual-state-p) + (region-active-p)) + (mark t)) + point))) (unless (evil-visual-state-p) (evil-visual-state)) (evil-active-region 1) |
