diff options
| -rw-r--r-- | evil-common.el | 90 | ||||
| -rw-r--r-- | evil-jumps.el | 5 | ||||
| -rw-r--r-- | evil-pkg.el | 3 | ||||
| -rwxr-xr-x | scripts/evilupdate | 1 |
4 files changed, 48 insertions, 51 deletions
diff --git a/evil-common.el b/evil-common.el index 4651db1..0e28aa7 100644 --- a/evil-common.el +++ b/evil-common.el @@ -3208,52 +3208,50 @@ must be regular expressions and `evil-up-block' is used. If the selection is exclusive, whitespace at the end or at the beginning of the selection until the end-of-line or beginning-of-line is ignored." - (lexical-let - ((open open) (close close)) - ;; we need special linewise exclusive selection - (unless inclusive (setq inclusive 'exclusive-line)) - (cond - ((and (characterp open) (characterp close)) - (let ((thing #'(lambda (&optional cnt) - (evil-up-paren open close cnt))) - (bnd (or (bounds-of-thing-at-point 'evil-string) - (bounds-of-thing-at-point 'evil-comment) - ;; If point is at the opening quote of a string, - ;; this must be handled as if point is within the - ;; string, i.e. the selection must be extended - ;; around the string. Otherwise - ;; `evil-select-block' might do the wrong thing - ;; because it accidentally moves point inside the - ;; string (for inclusive selection) when looking - ;; for the current surrounding block. (re #364) - (and (= (point) (or beg (point))) - (save-excursion - (goto-char (1+ (or beg (point)))) - (or (bounds-of-thing-at-point 'evil-string) - (bounds-of-thing-at-point 'evil-comment))))))) - (if (not bnd) - (evil-select-block thing beg end type count inclusive) - (or (evil-with-restriction (car bnd) (cdr bnd) - (condition-case nil - (evil-select-block thing beg end type count inclusive) - (error nil))) - (save-excursion - (setq beg (or beg (point)) - end (or end (point))) - (goto-char (car bnd)) - (let ((extbeg (min beg (car bnd))) - (extend (max end (cdr bnd)))) - (evil-select-block thing - extbeg extend - type - count - inclusive - (or (< extbeg beg) (> extend end)) - t))))))) - (t - (evil-select-block #'(lambda (&optional cnt) - (evil-up-block open close cnt)) - beg end type count inclusive))))) + ;; we need special linewise exclusive selection + (unless inclusive (setq inclusive 'exclusive-line)) + (cond + ((and (characterp open) (characterp close)) + (let ((thing #'(lambda (&optional cnt) + (evil-up-paren open close cnt))) + (bnd (or (bounds-of-thing-at-point 'evil-string) + (bounds-of-thing-at-point 'evil-comment) + ;; If point is at the opening quote of a string, + ;; this must be handled as if point is within the + ;; string, i.e. the selection must be extended + ;; around the string. Otherwise + ;; `evil-select-block' might do the wrong thing + ;; because it accidentally moves point inside the + ;; string (for inclusive selection) when looking + ;; for the current surrounding block. (re #364) + (and (= (point) (or beg (point))) + (save-excursion + (goto-char (1+ (or beg (point)))) + (or (bounds-of-thing-at-point 'evil-string) + (bounds-of-thing-at-point 'evil-comment))))))) + (if (not bnd) + (evil-select-block thing beg end type count inclusive) + (or (evil-with-restriction (car bnd) (cdr bnd) + (condition-case nil + (evil-select-block thing beg end type count inclusive) + (error nil))) + (save-excursion + (setq beg (or beg (point)) + end (or end (point))) + (goto-char (car bnd)) + (let ((extbeg (min beg (car bnd))) + (extend (max end (cdr bnd)))) + (evil-select-block thing + extbeg extend + type + count + inclusive + (or (< extbeg beg) (> extend end)) + t))))))) + (t + (evil-select-block #'(lambda (&optional cnt) + (evil-up-block open close cnt)) + beg end type count inclusive)))) (defun evil-select-quote-thing (thing beg end type count &optional inclusive) "Selection THING as if it described a quoted object. diff --git a/evil-jumps.el b/evil-jumps.el index 3c194b4..e3734e4 100644 --- a/evil-jumps.el +++ b/evil-jumps.el @@ -24,8 +24,7 @@ ;; You should have received a copy of the GNU General Public License ;; along with Evil. If not, see <http://www.gnu.org/licenses/>. -(eval-when-compile (require 'cl)) - +(require 'cl-lib) (require 'evil-core) (require 'evil-states) @@ -189,7 +188,7 @@ :entries (let* ((jumps (evil--jumps-savehist-sync)) (count 0)) (cl-loop for jump in jumps - collect `(nil [,(number-to-string (incf count)) + collect `(nil [,(number-to-string (cl-incf count)) ,(number-to-string (car jump)) (,(cadr jump))]))) :select-action #'evil--show-jumps-select-action)) diff --git a/evil-pkg.el b/evil-pkg.el index d537191..6cb699c 100644 --- a/evil-pkg.el +++ b/evil-pkg.el @@ -3,4 +3,5 @@ "1.2.12" "Extensible Vi layer for Emacs." '((undo-tree "0.6.3") - (goto-chg "1.6"))) + (goto-chg "1.6") + (cl-lib "0.5"))) diff --git a/scripts/evilupdate b/scripts/evilupdate index 3cac514..1723c03 100755 --- a/scripts/evilupdate +++ b/scripts/evilupdate @@ -48,7 +48,6 @@ (require 'f) (require 'erc) (require 'yaoddmuse) -(eval-when-compile (require 'cl)) (defconst evilupdate-irc-nick "lyrobot") (defconst evilupdate-irc-channel "#evil-mode") |
