[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil d8f5732: Fix compiler warnings (#1525)
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil d8f5732: Fix compiler warnings (#1525) |
Date: |
Mon, 4 Oct 2021 16:57:35 -0400 (EDT) |
branch: elpa/evil
commit d8f573270841dade794df44c08d4a512a3008968
Author: Tom Dalziel <33435574+tomdl89@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Fix compiler warnings (#1525)
---
evil-commands.el | 4 ++--
evil-common.el | 20 ++++++++++++++++++++
evil-ex.el | 21 +--------------------
evil-repeat.el | 3 +++
4 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/evil-commands.el b/evil-commands.el
index 990cacb..5e84b6c 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -744,7 +744,7 @@ Loop back to the top of buffer if the end is reached."
(evil-first-non-blank))
(user-error "No marks in this buffer")))
-(evil-define-command evil-set-col-0-mark (_beg end mark)
+(evil-define-command evil-set-col-0-mark (beg end mark)
"Set MARK at column 0 of line of END. Default is cursor line."
(interactive "<r><a>")
(if (< 1 (length mark))
@@ -1627,7 +1627,7 @@ given."
(interactive "<R><xc/><y>")
(evil-ex-delete-or-yank nil beg end type register count yank-handler))
-(evil-define-command evil-ex-put (_beg end ex-arg &optional force)
+(evil-define-command evil-ex-put (beg end ex-arg &optional force)
(interactive "<r><a><!>")
(let* ((arg-chars (remove ?\s (string-to-list ex-arg)))
(reg (or (car arg-chars) ?\"))
diff --git a/evil-common.el b/evil-common.el
index 3ac0cd5..f61d247 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -2073,6 +2073,26 @@ If INPUT starts with a number, +, -, or . use
`calc-eval' instead."
(mapconcat (lambda (x) (format "%s" x)) result "\n"))
(t (user-error "Using %s as a string" (type-of result))))))
+(defvar evil-paste-clear-minibuffer-first nil
+ "`evil-paste-before' cannot have `delete-minibuffer-contents' called before
+it fetches certain registers becuase this would trigger various ex-updates,
+sometimes moving point, so `C-a' `C-w' etc. would miss their intended target.")
+
+(defun evil-ex-remove-default ()
+ "Remove the default text shown in the ex minibuffer.
+When ex starts, the previous command is shown enclosed in
+parenthesis. This function removes this text when the first key
+is pressed."
+ (when (and (not (eq this-command 'exit-minibuffer))
+ (/= (minibuffer-prompt-end) (point-max)))
+ (if (eq this-command 'evil-ex-delete-backward-char)
+ (setq this-command 'ignore))
+ (if (eq this-original-command 'evil-paste-from-register)
+ (setq evil-paste-clear-minibuffer-first t)
+ (delete-minibuffer-contents)))
+ (remove-hook 'pre-command-hook #'evil-ex-remove-default))
+(put 'evil-ex-remove-default 'permanent-local-hook t)
+
(defun evil-get-register (register &optional noerror)
"Return contents of REGISTER.
Signal an error if empty, unless NOERROR is non-nil.
diff --git a/evil-ex.el b/evil-ex.el
index c6a311f..2a13489 100644
--- a/evil-ex.el
+++ b/evil-ex.el
@@ -42,6 +42,7 @@
(require 'evil-common)
(require 'evil-states)
+(require 'evil-types)
(require 'shell)
;;; Code:
@@ -265,26 +266,6 @@ Clean up everything set up by `evil-ex-setup'."
(funcall runner 'stop)))))
(put 'evil-ex-teardown 'permanent-local-hook t)
-(defvar evil-paste-clear-minibuffer-first nil
- "`evil-paste-before' cannot have `delete-minibuffer-contents' called
-before it fetches certain registers becuase this would trigger various
ex-updates,
-sometimes moving point, so `C-a' `C-w' etc. would miss their intended target.")
-
-(defun evil-ex-remove-default ()
- "Remove the default text shown in the ex minibuffer.
-When ex starts, the previous command is shown enclosed in
-parenthesis. This function removes this text when the first key
-is pressed."
- (when (and (not (eq this-command 'exit-minibuffer))
- (/= (minibuffer-prompt-end) (point-max)))
- (if (eq this-command 'evil-ex-delete-backward-char)
- (setq this-command 'ignore))
- (if (eq this-original-command 'evil-paste-from-register)
- (setq evil-paste-clear-minibuffer-first t)
- (delete-minibuffer-contents)))
- (remove-hook 'pre-command-hook #'evil-ex-remove-default))
-(put 'evil-ex-remove-default 'permanent-local-hook t)
-
(defun evil-ex-update (&optional beg end len string)
"Update Ex variables when the minibuffer changes.
This function is usually called from `after-change-functions'
diff --git a/evil-repeat.el b/evil-repeat.el
index f0014bd..e9c4295 100644
--- a/evil-repeat.el
+++ b/evil-repeat.el
@@ -553,6 +553,9 @@ and only if COUNT is non-nil."
(t
(evil-execute-repeat-info repeat-info)))))
+;; Keep the compiler happy - this is a buffer local var
+(defvar evil--execute-normal-return-state)
+
(evil-define-command evil-repeat (count &optional save-point)
"Repeat the last editing command with count replaced by COUNT.
If SAVE-POINT is non-nil, do not move point."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/evil d8f5732: Fix compiler warnings (#1525),
ELPA Syncer <=