emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/evil-surround 67a82903ec 009/175: Use text object keymaps


From: ELPA Syncer
Subject: [nongnu] elpa/evil-surround 67a82903ec 009/175: Use text object keymaps
Date: Mon, 9 Oct 2023 13:00:59 -0400 (EDT)

branch: elpa/evil-surround
commit 67a82903ec75e55d2ef837ff535dfe275a098f28
Author: Vegard Øye <vegard_oye@hotmail.com>
Commit: Vegard Øye <vegard_oye@hotmail.com>

    Use text object keymaps
    
    Look up text objects in `evil-outer-text-objects-map' and
    `evil-inner-text-objects-map' instead of relying on a hard-coded
    "a"/"i" prefix.
---
 surround.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/surround.el b/surround.el
index 268fd7e8cb..8fe9d463c3 100644
--- a/surround.el
+++ b/surround.el
@@ -96,8 +96,7 @@ This is a cons cell (LEFT . RIGHT), both strings."
   "Return outer overlay for the delimited range represented by CHAR.
 This overlay includes the delimiters.
 See also `surround-inner-overlay'."
-  (let ((outer (lookup-key evil-motion-state-map
-                           (format "a%c" char))))
+  (let ((outer (lookup-key evil-outer-text-objects-map (string char))))
     (when (functionp outer)
       (setq outer (funcall outer))
       (when (evil-range-p outer)
@@ -121,8 +120,7 @@ See also `surround-inner-overlay'."
   "Return inner overlay for the delimited range represented by CHAR.
 This overlay excludes the delimiters.
 See also `surround-outer-overlay'."
-  (let ((inner (lookup-key evil-motion-state-map
-                           (format "i%c" char))))
+  (let ((inner (lookup-key evil-inner-text-objects-map (string char))))
     (when (functionp inner)
       (setq inner (funcall inner))
       (when (evil-range-p inner)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]