[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-surround 2d878b6cce 166/175: Enable lexical binding
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-surround 2d878b6cce 166/175: Enable lexical binding |
Date: |
Mon, 9 Oct 2023 13:01:16 -0400 (EDT) |
branch: elpa/evil-surround
commit 2d878b6ccefe0f39216a178cefdc3f0fa2aa7fef
Author: Brian Leung <leungbk@posteo.net>
Commit: Tom Dalziel <33435574+tomdl89@users.noreply.github.com>
Enable lexical binding
---
evil-surround.el | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/evil-surround.el b/evil-surround.el
index 0fd2cad6a0..0c8bfa13b5 100644
--- a/evil-surround.el
+++ b/evil-surround.el
@@ -1,4 +1,4 @@
-;;; evil-surround.el --- emulate surround.vim from Vim
+;;; evil-surround.el --- emulate surround.vim from Vim -*- lexical-binding:
t; -*-
;; Copyright (C) 2010 - 2017 Tim Harper
;; Copyright (C) 2018 - 2020 The evil-surround.el Contributors
@@ -115,6 +115,11 @@ Each item is of the form (OPERATOR . OPERATION)."
(defvar evil-surround-last-deleted-left ""
"The previously deleted LEFT region.")
+(defvar evil-surround-current-pair nil
+ "The current pair.
+
+When non-nil, it can be either a cons or a function returning a cons.")
+
(defun evil-surround-read-from-minibuffer (&rest args)
(when (or evil-surround-record-repeat
(evil-repeat-recording-p))
@@ -190,13 +195,13 @@ function call in prefixed form."
(defun evil-surround-pair (char)
"Return the evil-surround pair of char.
This is a cons cell (LEFT . RIGHT), both strings."
- (let ((pair (assoc-default char evil-surround-pairs-alist)))
+ (let ((evil-surround-current-pair (assoc-default char
evil-surround-pairs-alist)))
(cond
- ((functionp pair)
- (funcall pair))
+ ((functionp evil-surround-current-pair)
+ (funcall evil-surround-current-pair))
- ((consp pair)
- pair)
+ ((consp evil-surround-current-pair)
+ evil-surround-current-pair)
(t
(cons (format "%c" char) (format "%c" char))))))
@@ -403,9 +408,9 @@ Becomes this:
(when (evil-surround-valid-char-p char)
(let* ((overlay (make-overlay beg end nil nil t))
- (pair (or (and (boundp 'pair) pair) (evil-surround-pair char)))
- (open (car pair))
- (close (cdr pair))
+ (evil-surround-current-pair (or evil-surround-current-pair
(evil-surround-pair char)))
+ (open (car evil-surround-current-pair))
+ (close (cdr evil-surround-current-pair))
(beg-pos (overlay-start overlay)))
(unwind-protect
(progn
- [nongnu] elpa/evil-surround 1d4e72a178 099/175: closes #98: orgify readme, (continued)
- [nongnu] elpa/evil-surround 1d4e72a178 099/175: closes #98: orgify readme, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 92299c2e5c 112/175: upgrade badges. add GPLv3 badge., ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 9967e5f4e4 118/175: fix typo, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 5a8b3eac2c 114/175: update logo, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 757ddb93c7 122/175: add tests for @jusbur's pull #130 which fixes #125, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround a14856cd81 157/175: Bump version to 1.0.4, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 5a20c9757e 126/175: surround-function improvement for lisp modes (#134), ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 62255a9901 123/175: Fix regression for Emacs 26 caused by #125 fix, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 6e1da767ec 125/175: try same layout layout as evil, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 63ce018488 132/175: add license file, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 2d878b6cce 166/175: Enable lexical binding,
ELPA Syncer <=
- [nongnu] elpa/evil-surround 6028c76399 131/175: readme: add missing link to `define-and-bind-text-object` macro, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 83c2e0f369 137/175: add a "make emacs" makefile option to fire up a clean emacs..., ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 440d391c89 130/175: Fix visible narrowing when surrounding within a field (#135), ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround b11048d92a 173/175: Trim whitespace from delimeters before using for deletion/change, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 4d6cc94df0 146/175: Add surround text objects from local keymap (#165), ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 282a975bda 154/175: Typo fix, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround a3803cfb51 141/175: Add a test for surrounding with a tag in a macro, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 6d37e5c910 115/175: add melpa stable badge, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround f273821f57 165/175: Merge pull request #188 from skangas/nongnu-elpa-fixes, ELPA Syncer, 2023/10/09
- [nongnu] elpa/evil-surround 2bc8aa6425 160/175: Merge pull request #186 from leungbk/prefix-calls, ELPA Syncer, 2023/10/09