diff options
| -rw-r--r-- | evil-commands.el | 5 | ||||
| -rw-r--r-- | evil-ex.el | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/evil-commands.el b/evil-commands.el index f2770ae..466f36d 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -3599,6 +3599,9 @@ This is the same as :%s//~/&" (evil-with-single-undo (let ((case-fold-search (eq (evil-ex-regex-case pattern 'smart) 'insensitive)) + (command-form (evil-ex-parse command)) + (transient-mark-mode transient-mark-mode) + (deactivate-mark deactivate-mark) match markers) (when (and pattern command) (setq isearch-string pattern) @@ -3618,7 +3621,7 @@ This is the same as :%s//~/&" (unwind-protect (dolist (marker markers) (goto-char marker) - (evil-ex-eval command)) + (eval command-form)) ;; ensure that all markers are deleted afterwards, ;; even in the event of failure (dolist (marker markers) @@ -826,14 +826,8 @@ Returns the line number of the match." NUMBER defaults to 1." (funcall sign (or number 1))) -(defun evil-ex-eval (string &optional start) - "Evaluate STRING as an Ex command. -START is the start symbol, which defaults to `expression'." - ;; disable the mark before executing, otherwise the visual region - ;; may be used as operator range instead of the ex-range - (let ((form (evil-ex-parse string nil start)) - transient-mark-mode deactivate-mark) - (eval form))) +;; function `evil-ex-eval' has been superseded by `evil-ex-parse' plus `eval' +(make-obsolete 'evil-ex-eval 'evil-ex-parse "1.2.14") (defun evil-ex-parse (string &optional syntax start) "Parse STRING as an Ex expression and return an evaluation tree. |
