[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] scratch/evil 9456d95bef 3/8: Prefer #' to quote function names
From: |
Stefan Monnier |
Subject: |
[nongnu] scratch/evil 9456d95bef 3/8: Prefer #' to quote function names |
Date: |
Sun, 2 Jul 2023 17:38:07 -0400 (EDT) |
branch: scratch/evil
commit 9456d95befc25b13370522bfcc4131b597b005b4
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Prefer #' to quote function names
---
evil-commands.el | 16 +++++-----
evil-common.el | 10 +++----
evil-core.el | 8 ++---
evil-ex.el | 2 +-
evil-integration.el | 2 +-
evil-keybindings.el | 2 +-
evil-search.el | 4 +--
evil-tests.el | 58 ++++++++++++++++++------------------
evil-vars.el | 85 +++++++++++++++++++++++++++++------------------------
9 files changed, 97 insertions(+), 90 deletions(-)
diff --git a/evil-commands.el b/evil-commands.el
index abac1aea57..0b28ceac34 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -3263,7 +3263,7 @@ not interfere with another."
(if (null list)
(user-error
"Enable one of the following modes for folding to work: %s"
- (mapconcat 'symbol-name (mapcar 'caar evil-fold-list) ", "))
+ (mapconcat #'symbol-name (mapcar #'caar evil-fold-list) ", "))
(let* ((modes (caar list)))
(if (evil--mode-p modes)
(let* ((actions (cdar list))
@@ -5175,9 +5175,9 @@ if the previous state was Emacs state."
"No insert-state repeat info is recorded after executing in normal state.
Restore the disabled repeat hooks on insert-state exit."
(evil-repeat-stop)
- (add-hook 'pre-command-hook 'evil-repeat-pre-hook)
- (add-hook 'post-command-hook 'evil-repeat-post-hook)
- (remove-hook 'evil-insert-state-exit-hook 'evil--restore-repeat-hooks))
+ (add-hook 'pre-command-hook #'evil-repeat-pre-hook)
+ (add-hook 'post-command-hook #'evil-repeat-post-hook)
+ (remove-hook 'evil-insert-state-exit-hook #'evil--restore-repeat-hooks))
(defvar evil--execute-normal-return-state nil
"The state to return to after executing in normal state.")
@@ -5216,9 +5216,9 @@ Restore the disabled repeat hooks on insert-state exit."
(unless (memq evil-state '(replace insert))
(evil-change-state ',evil-state))
(when (eq 'insert evil-state)
- (remove-hook 'pre-command-hook 'evil-repeat-pre-hook)
- (remove-hook 'post-command-hook 'evil-repeat-post-hook)
- (add-hook 'evil-insert-state-exit-hook 'evil--restore-repeat-hooks))
+ (remove-hook 'pre-command-hook #'evil-repeat-pre-hook)
+ (remove-hook 'post-command-hook #'evil-repeat-post-hook)
+ (add-hook 'evil-insert-state-exit-hook
#'evil--restore-repeat-hooks))
(setq evil-execute-normal-keys nil))
'post-command-hook)
(setq evil-insert-count nil
@@ -5231,7 +5231,7 @@ Restore the disabled repeat hooks on insert-state exit."
(defun evil-stop-execute-in-emacs-state ()
(when (and (not (eq this-command #'evil-execute-in-emacs-state))
(not (minibufferp)))
- (remove-hook 'post-command-hook 'evil-stop-execute-in-emacs-state)
+ (remove-hook 'post-command-hook #'evil-stop-execute-in-emacs-state)
(when (buffer-live-p evil-execute-in-emacs-state-buffer)
(with-current-buffer evil-execute-in-emacs-state-buffer
(if (and (eq evil-previous-state 'visual)
diff --git a/evil-common.el b/evil-common.el
index 3e4ce01519..1311ae366d 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -345,11 +345,11 @@ last, sorting in between."
,(when (and command doc-form)
`(put ',command 'function-documentation ,doc-form))
;; set command properties for symbol or lambda function
- (let ((func ',(if (and (null command) body)
- `(lambda ,args
- ,interactive
- ,@body)
- command)))
+ (let ((func #',(if (and (null command) body)
+ `(lambda ,args
+ ,interactive
+ ,@body)
+ command)))
(apply #'evil-set-command-properties func ',keys)
func))))
diff --git a/evil-core.el b/evil-core.el
index 546288e14c..8f7eba9002 100644
--- a/evil-core.el
+++ b/evil-core.el
@@ -126,12 +126,12 @@
(evil-initialize-state)
(add-hook 'input-method-activate-hook #'evil-activate-input-method t t)
(add-hook 'input-method-deactivate-hook #'evil-deactivate-input-method
t t)
- (add-hook 'activate-mark-hook 'evil-visual-activate-hook nil t)
+ (add-hook 'activate-mark-hook #'evil-visual-activate-hook nil t)
;; FIXME: Add these hooks buffer-locally
- (add-hook 'pre-command-hook 'evil-repeat-pre-hook)
- (add-hook 'post-command-hook 'evil-repeat-post-hook))
+ (add-hook 'pre-command-hook #'evil-repeat-pre-hook)
+ (add-hook 'post-command-hook #'evil-repeat-post-hook))
(evil-refresh-mode-line)
- (remove-hook 'activate-mark-hook 'evil-visual-activate-hook t)
+ (remove-hook 'activate-mark-hook #'evil-visual-activate-hook t)
(remove-hook 'input-method-activate-hook #'evil-activate-input-method t)
(remove-hook 'input-method-deactivate-hook #'evil-deactivate-input-method
t)
(activate-input-method evil-input-method)
diff --git a/evil-ex.el b/evil-ex.el
index 05f66b993a..1a26a053c7 100644
--- a/evil-ex.el
+++ b/evil-ex.el
@@ -751,7 +751,7 @@ argument handler that requires shell completion."
(define-obsolete-function-alias
'evil-ex-shell-command-completion-at-point
- 'comint-completion-at-point "1.2.13")
+ #'comint-completion-at-point "1.2.13")
(evil-ex-define-argument-type shell
"Shell argument type, supports completion."
diff --git a/evil-integration.el b/evil-integration.el
index 6022b83497..7aa0407278 100644
--- a/evil-integration.el
+++ b/evil-integration.el
@@ -473,7 +473,7 @@ Based on `evil-enclose-ace-jump-for-motion'."
(expand-abbrev)))
(eval-after-load 'abbrev
- '(add-hook 'evil-insert-state-exit-hook 'evil-maybe-expand-abbrev))
+ '(add-hook 'evil-insert-state-exit-hook #'evil-maybe-expand-abbrev))
;;; ElDoc
(eval-after-load 'eldoc
diff --git a/evil-keybindings.el b/evil-keybindings.el
index 8534ec856d..c63890b05a 100644
--- a/evil-keybindings.el
+++ b/evil-keybindings.el
@@ -42,7 +42,7 @@
;; FIXME: probably etags-select should be recomended in docs
(eval-after-load 'etags-select
'(progn
- (define-key evil-motion-state-map "g]" 'etags-select-find-tag-at-point)))
+ (define-key evil-motion-state-map "g]" #'etags-select-find-tag-at-point)))
;;; Buffer-menu
diff --git a/evil-search.el b/evil-search.el
index e333221e1f..c031052487 100644
--- a/evil-search.el
+++ b/evil-search.el
@@ -65,8 +65,8 @@ To swap out relevant keybindings, see
`evil-select-search-module' function."
:type '(radio (const :tag "Emacs built-in isearch." :value isearch)
(const :tag "Evil interactive search." :value evil-search))
:group 'evil
- :set 'evil-select-search-module
- :initialize 'evil-custom-initialize-pending-reset)
+ :set #'evil-select-search-module
+ :initialize #'evil-custom-initialize-pending-reset)
(defun evil-push-search-history (string forward)
"Push STRING into the appropriate search history (determined by FORWARD)."
diff --git a/evil-tests.el b/evil-tests.el
index 9e8f8589ec..d9311a59d9 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -1948,7 +1948,7 @@ New Tex[t]
";; [T]his buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y3s")
(should (string= (current-kill 0) "Thi\nIf \nthe"))
(should (eq (car-safe (get-text-property 0 'yank-handler
@@ -2056,7 +2056,7 @@ New Tex[t]
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("d3s")
"[T]his buffer is for notes you don't want to save.
If you want to create a file, visit that file with C-x C-f,
@@ -2301,7 +2301,7 @@ for this test."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("c3sABC" [escape])
"AB[C]This buffer is for notes you don't want to save.
ABCIf you want to create a file, visit that file with C-x C-f,
@@ -2614,7 +2614,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("3ysP")
"[;]; ;; This buffer is for notes you don't want to save.
;; ;; If you want to create a file, visit that file with C-x C-f,
@@ -2624,7 +2624,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("3ys2P")
"[;]; ;; ;; This buffer is for notes you don't want to save.
;; ;; ;; If you want to create a file, visit that file with C-x C-f,
@@ -2634,7 +2634,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; Above some line
;; Below some empty line"
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("3ys2P")
"[;]; ;; ;; Above some line
\n\
@@ -2644,7 +2644,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("3ysj")
";; This buffer is for notes you don't want to save.
\[;]; If you want to create a file, visit that file with C-x C-f,
@@ -2659,7 +2659,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("3ys$")
";; This buffer is for notes you don't want to save[.]
;; If you want to create a file, visit that file with C-x C-f,
@@ -2741,7 +2741,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("3ysp")
";[;]; ; This buffer is for notes you don't want to save.
;;; ; If you want to create a file, visit that file with C-x C-f,
@@ -2751,7 +2751,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("3ys2p")
";[;]; ;; ; This buffer is for notes you don't want to save.
;;; ;; ; If you want to create a file, visit that file with C-x C-f,
@@ -2761,7 +2761,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; Above some line
;; Below some empty line"
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("3ys2p")
";;; ;; ; Above some line
@@ -2771,7 +2771,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("3ysj")
";; This buffer is for notes you don't want to save.
\[;]; If you want to create a file, visit that file with C-x C-f,
@@ -2786,7 +2786,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("3ys$")
";; This buffer is for notes you don't want to save[.]
;; If you want to create a file, visit that file with C-x C-f,
@@ -2816,7 +2816,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sj")
";; This buffer is for notes you don't want to save.
\[;]; If you want to create a file, visit that file with C-x C-f,
@@ -2831,7 +2831,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sjP\C-p")
";; This buffer is for notes you don't want to save.
\[;]; This buffer is for notes you don't want to save.
@@ -2843,7 +2843,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sjP\C-p\C-p")
";; This buffer is for notes you don't want to save.
;; Thi[s];; If you want to create a file, visit that file with C-x C-f,
@@ -2853,7 +2853,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sjP2\C-p")
";; This buffer is for notes you don't want to save.
;; Thi[s];; If you want to create a file, visit that file with C-x C-f,
@@ -2863,7 +2863,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sjP2\C-p\C-n")
";; This buffer is for notes you don't want to save.
\[;]; This buffer is for notes you don't want to save.
@@ -2875,7 +2875,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sjP\C-p\C-p2\C-n")
";; This buffer is for notes you don't want to save.
\[;]; ;; If you want to create a file, visit that file with C-x C-f,
@@ -2890,7 +2890,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sj")
";; This buffer is for notes you don't want to save.
\[;]; If you want to create a file, visit that file with C-x C-f,
@@ -2905,7 +2905,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sjp\C-p")
";; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
@@ -2917,7 +2917,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sjp\C-p\C-p")
";; This buffer is for notes you don't want to save.
;;; Thi[s]; If you want to create a file, visit that file with C-x C-f,
@@ -2927,7 +2927,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sjp2\C-p")
";; This buffer is for notes you don't want to save.
;;; Thi[s]; If you want to create a file, visit that file with C-x C-f,
@@ -2937,7 +2937,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sjp2\C-p\C-n")
";; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
@@ -2949,7 +2949,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
"[;]; This buffer is for notes you don't want to save.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sjp\C-p\C-p2\C-n")
";; This buffer is for notes you don't want to save.
;[;]; ; If you want to create a file, visit that file with C-x C-f,
@@ -2965,7 +2965,7 @@ This bufferThis bufferThis buffe[r];; and for Lisp
evaluation."))
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer."
(setq buffer-undo-list t)
- (define-key evil-operator-state-local-map "s" 'evil-test-square-motion)
+ (define-key evil-operator-state-local-map "s" #'evil-test-square-motion)
("y2e2yyy3sjP\C-p\C-p2\C-n")
";; This buffer is for notes you don't want to save.
\[;]; ;; If you want to create a file, visit that file with C-x C-f,
@@ -7449,7 +7449,7 @@ golf h[o]>tel")))
([backspace backspace backspace backspace backspace backspace backspace])
";; This buffer is for [n]otes"))
(ert-info ("Replace from line below and restore")
- (define-key evil-replace-state-map (kbd "C-e") 'evil-copy-from-below)
+ (define-key evil-replace-state-map (kbd "C-e") #'evil-copy-from-below)
(evil-test-buffer
";; [f]oo bar\n;; qux quux"
("R\C-e\C-e\C-e")
@@ -7458,7 +7458,7 @@ golf h[o]>tel")))
";; [f]oo bar\n;; qux quux")
(define-key evil-replace-state-map (kbd "C-e") nil))
(ert-info ("Replace from line above and restore")
- (define-key evil-replace-state-map (kbd "C-y") 'evil-copy-from-above)
+ (define-key evil-replace-state-map (kbd "C-y") #'evil-copy-from-above)
(evil-test-buffer
";; foo bar\n;; [q]ux quux"
("R\C-y\C-y\C-y")
@@ -9482,7 +9482,7 @@ parameter set."
(ert-info ("Find file at point with line and column numbers")
(let* ((line-number 3)
(column-number 5)
- (file-content (mapconcat 'identity
+ (file-content (mapconcat #'identity
(make-list (* 2 line-number)
(make-string (* 2
column-number) ?\s))
"\n")))
diff --git a/evil-vars.el b/evil-vars.el
index ff09af0eed..859215b049 100644
--- a/evil-vars.el
+++ b/evil-vars.el
@@ -70,8 +70,8 @@ the :initialize property of `defcustom'.")
See `evil-pending-custom-initialize'."
(dolist (init evil-pending-custom-initialize)
(apply (car init) (cdr init)))
- (remove-hook 'evil-after-load-hook 'evil-run-pending-custom-initialize))
-(add-hook 'evil-after-load-hook 'evil-run-pending-custom-initialize)
+ (remove-hook 'evil-after-load-hook #'evil-run-pending-custom-initialize))
+(add-hook 'evil-after-load-hook #'evil-run-pending-custom-initialize)
;;; Setters
@@ -467,11 +467,12 @@ Otherwise, `C-i' inserts a tab character."
(cond
((and (not value)
(eq (lookup-key evil-motion-state-map (kbd "C-i"))
- 'evil-jump-forward))
+ #'evil-jump-forward))
(define-key evil-motion-state-map (kbd "C-i") nil))
((and value
(not (lookup-key evil-motion-state-map (kbd "C-i"))))
- (define-key evil-motion-state-map (kbd "C-i")
'evil-jump-forward))))))
+ (define-key evil-motion-state-map (kbd "C-i")
+ #'evil-jump-forward))))))
(defcustom evil-want-C-u-scroll nil
"Whether `C-u' scrolls up (like Vim).
@@ -486,11 +487,12 @@ ubiquity of prefix arguments."
(cond
((and (not value)
(eq (lookup-key evil-motion-state-map (kbd "C-u"))
- 'evil-scroll-up))
+ #'evil-scroll-up))
(define-key evil-motion-state-map (kbd "C-u") nil))
((and value
(not (lookup-key evil-motion-state-map (kbd "C-u"))))
- (define-key evil-motion-state-map (kbd "C-u")
'evil-scroll-up))))))
+ (define-key evil-motion-state-map (kbd "C-u")
+ #'evil-scroll-up))))))
(defcustom evil-want-C-d-scroll t
"Whether `C-d' scrolls down (like Vim)."
@@ -502,11 +504,12 @@ ubiquity of prefix arguments."
(cond
((and (not value)
(eq (lookup-key evil-motion-state-map (kbd "C-d"))
- 'evil-scroll-down))
+ #'evil-scroll-down))
(define-key evil-motion-state-map (kbd "C-d") nil))
((and value
(not (lookup-key evil-motion-state-map (kbd "C-d"))))
- (define-key evil-motion-state-map (kbd "C-d")
'evil-scroll-down))))))
+ (define-key evil-motion-state-map (kbd "C-d")
+ #'evil-scroll-down))))))
(defcustom evil-want-C-u-delete nil
"Whether `C-u' deletes back to indentation in insert state.
@@ -522,13 +525,15 @@ ubiquity of prefix arguments."
(cond
((and (not value)
(eq (lookup-key evil-insert-state-map (kbd "C-u"))
- 'evil-delete-back-to-indentation))
+ #'evil-delete-back-to-indentation))
(define-key evil-insert-state-map (kbd "C-u") nil)
(define-key evil-replace-state-map (kbd "C-u") nil))
((and value
(not (lookup-key evil-insert-state-map (kbd "C-u"))))
- (define-key evil-insert-state-map (kbd "C-u")
'evil-delete-back-to-indentation)
- (define-key evil-replace-state-map (kbd "C-u")
'evil-delete-back-to-indentation))))))
+ (define-key evil-insert-state-map (kbd "C-u")
+ #'evil-delete-back-to-indentation)
+ (define-key evil-replace-state-map (kbd "C-u")
+ #'evil-delete-back-to-indentation))))))
(defcustom evil-want-C-w-delete t
"Whether `C-w' deletes a word in Insert/Ex/Search state."
@@ -541,34 +546,34 @@ ubiquity of prefix arguments."
(cond
((and (not value)
(eq (lookup-key evil-insert-state-map (kbd "C-w"))
- 'evil-delete-backward-word))
+ #'evil-delete-backward-word))
(define-key evil-insert-state-map (kbd "C-w") 'evil-window-map)
(define-key evil-replace-state-map (kbd "C-w")
'evil-window-map))
((and value
(eq (lookup-key evil-insert-state-map (kbd "C-w"))
'evil-window-map))
- (define-key evil-insert-state-map (kbd "C-w")
'evil-delete-backward-word)
- (define-key evil-replace-state-map (kbd "C-w")
'evil-delete-backward-word))))
+ (define-key evil-insert-state-map (kbd "C-w")
#'evil-delete-backward-word)
+ (define-key evil-replace-state-map (kbd "C-w")
#'evil-delete-backward-word))))
(when (boundp 'evil-ex-search-keymap)
(cond
((and (not value)
(eq (lookup-key evil-ex-search-keymap (kbd "C-w"))
- 'backward-kill-word))
- (define-key evil-ex-search-keymap (kbd "C-w")
'evil-search-yank-word))
+ #'backward-kill-word))
+ (define-key evil-ex-search-keymap (kbd "C-w")
#'evil-search-yank-word))
((and value
(eq (lookup-key evil-ex-search-keymap (kbd "C-w"))
- 'evil-search-yank-word))
- (define-key evil-ex-search-keymap (kbd "C-w")
'backward-kill-word))))
+ #'evil-search-yank-word))
+ (define-key evil-ex-search-keymap (kbd "C-w")
#'backward-kill-word))))
(when (boundp 'evil-ex-completion-map)
(cond
((and (not value)
(eq (lookup-key evil-ex-completion-map (kbd "C-w"))
- 'backward-kill-word))
+ #'backward-kill-word))
(define-key evil-ex-completion-map (kbd "C-w") nil))
((and value
(eq (lookup-key evil-ex-completion-map (kbd "C-w"))
nil))
- (define-key evil-ex-completion-map (kbd "C-w")
'backward-kill-word))))))
+ (define-key evil-ex-completion-map (kbd "C-w")
#'backward-kill-word))))))
(defcustom evil-want-C-h-delete nil
"Whether `C-h' deletes a char in Insert state."
@@ -581,13 +586,15 @@ ubiquity of prefix arguments."
(cond
((and (not value)
(eq (lookup-key evil-insert-state-map (kbd "C-h"))
- 'evil-delete-backward-char-and-join))
+ #'evil-delete-backward-char-and-join))
(define-key evil-insert-state-map (kbd "C-h") nil)
(define-key evil-replace-state-map (kbd "C-h") nil))
((and value
(not (lookup-key evil-insert-state-map (kbd "C-h"))))
- (define-key evil-insert-state-map (kbd "C-h")
'evil-delete-backward-char-and-join)
- (define-key evil-replace-state-map (kbd "C-h")
'evil-replace-backspace))))))
+ (define-key evil-insert-state-map (kbd "C-h")
+ #'evil-delete-backward-char-and-join)
+ (define-key evil-replace-state-map (kbd "C-h")
+ #'evil-replace-backspace))))))
(defcustom evil-want-C-g-bindings nil
"Whether `C-g' postfix can be used in bindings."
@@ -971,7 +978,7 @@ overridden."
'override-state
'evil-make-overriding-map
values))
- :initialize 'evil-custom-initialize-pending-reset)
+ :initialize #'evil-custom-initialize-pending-reset)
(add-hook 'after-load-functions #'evil-update-pending-maps)
@@ -991,7 +998,7 @@ intercepted."
'intercept-state
'evil-make-intercept-map
values))
- :initialize 'evil-custom-initialize-pending-reset)
+ :initialize #'evil-custom-initialize-pending-reset)
(defcustom evil-motions
'(back-to-indentation
@@ -1090,8 +1097,8 @@ intercepted."
"Non-Evil commands to initialize to motions."
:type '(repeat symbol)
:group 'evil
- :set 'evil-set-custom-motions
- :initialize 'evil-custom-initialize-pending-reset)
+ :set #'evil-set-custom-motions
+ :initialize #'evil-custom-initialize-pending-reset)
(defcustom evil-visual-newline-commands
'(LaTeX-section
@@ -1100,8 +1107,8 @@ intercepted."
These commands work better without this newline."
:type '(repeat symbol)
:group 'evil
- :set 'evil-set-visual-newline-commands
- :initialize 'evil-custom-initialize-pending-reset)
+ :set #'evil-set-visual-newline-commands
+ :initialize #'evil-custom-initialize-pending-reset)
(defcustom evil-want-visual-char-semi-exclusive nil
"DEPRECATED. Will be removed in a future version.
@@ -2036,7 +2043,7 @@ Otherwise the previous command is assumed as substitute.")
(defvar evil-ex-search-keymap (make-sparse-keymap)
"Keymap used in ex-search-mode.")
-(define-key evil-ex-search-keymap [escape] 'abort-recursive-edit)
+(define-key evil-ex-search-keymap [escape] #'abort-recursive-edit)
(set-keymap-parent evil-ex-search-keymap minibuffer-local-map)
(defcustom evil-want-empty-ex-last-command t
@@ -2087,29 +2094,29 @@ This variable must be set before evil is loaded."
:set #'(lambda (sym value)
(set-default sym value)
(if value
- (add-hook 'minibuffer-setup-hook 'evil-initialize)
- (remove-hook 'minibuffer-setup-hook 'evil-initialize))))
+ (add-hook 'minibuffer-setup-hook #'evil-initialize)
+ (remove-hook 'minibuffer-setup-hook #'evil-initialize))))
(defun evil--redo-placeholder (_count)
(user-error "Customize `evil-undo-system' for redo functionality."))
-(defvar evil-undo-function 'undo
+(defvar evil-undo-function #'undo
"Function to be used by `evil-undo'.
Customized via `evil-undo-system'.")
-(defvar evil-redo-function 'evil--redo-placeholder
- "Function to be used by 'evil-redo'.
+(defvar evil-redo-function #'evil--redo-placeholder
+ "Function to be used by `evil-redo'.
Customized via `evil-undo-system'.")
(defun evil-set-undo-system (system)
"Set `evil-undo-function' and `evil-redo-function` by SYSTEM."
(cond
((not system)
- (setq evil-undo-function 'undo
- evil-redo-function 'evil--redo-placeholder))
+ (setq evil-undo-function #'undo
+ evil-redo-function #'evil--redo-placeholder))
((eq system 'undo-redo)
- (setq evil-undo-function 'undo-only
- evil-redo-function 'undo-redo))
+ (setq evil-undo-function #'undo-only
+ evil-redo-function #'undo-redo))
((eq system 'undo-tree)
(setq evil-undo-function 'undo-tree-undo
evil-redo-function 'undo-tree-redo))
- [nongnu] branch scratch/evil created (now 30e812bb6c), Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil 891af30ef2 2/8: Better follow conventions for use of ' in docstrings, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil 49ba6e6fc5 5/8: Use lexical-binding everywhere, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil b9298c600f 4/8: (evil-with-delay): New macro, extracted from `evil-delay`, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil f77b9d3723 1/8: evil-pkg.el: Remove file, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil 30e812bb6c 8/8: Misc minor changes, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil 9456d95bef 3/8: Prefer #' to quote function names,
Stefan Monnier <=
- [nongnu] scratch/evil a3657caba8 7/8: Replace uses of `defadvice` with `advice-add`, Stefan Monnier, 2023/07/02
- [nongnu] scratch/evil 0a03b8d2ad 6/8: Remove redundant `:group` args, Stefan Monnier, 2023/07/02