branch: scratch/evil commit 75134ec905d47f8310a2e33d9f486eea8438ece6 Author: Stefan Monnier <monn...@iro.umontreal.ca> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
Miscellanous minor changes. Use #' to quote function names at a few more places. * evil-types.el (inclusive): Silence warning. * evil-macros.el (font-lock-add-keywords): Use the font-lock faces rather than their obsolete variables. * evil-ex.el (evil-ex-define-argument-type): Make sure the function arguments can be compiled. (evil-ex-init-shell-argument-completion): Don't let-bind `completion-at-point-functions` because hooks aren't just variables. * evil-core.el (evil--local-advice-add): New function. (evil--global-advice-list): Rename from `evil--advice-list`. (evil-mode): Only activate the global advices. (evil--global-advice-add): Rename from `evil--advice-add`. --- evil-core.el | 8 ++++---- evil-ex.el | 12 ++++++------ evil-macros.el | 8 ++++---- evil-vars.el | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/evil-core.el b/evil-core.el index 46e2d2d751..91ec80e448 100644 --- a/evil-core.el +++ b/evil-core.el @@ -134,12 +134,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 and remove when disabling - (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 644fe7f78c..f768d989be 100644 --- a/evil-ex.el +++ b/evil-ex.el @@ -633,13 +633,13 @@ and function: (func (pop body))) (cond ((eq key :runner) - (setq runner func)) + (setq runner `#',func)) ((eq key :collection) - (setq completer (cons 'collection func))) + (setq completer `(cons 'collection #',func))) ((eq key :completion-at-point) - (setq completer (cons 'completion-at-point func)))))) + (setq completer `(cons 'completion-at-point #',func)))))) `(evil--add-to-alist evil-ex-argument-types - ',arg-type '(,runner ,completer)))) + ',arg-type (list ,runner ,completer)))) (evil-ex-define-argument-type file "Handle a file argument." @@ -666,8 +666,8 @@ argument handler that requires shell completion." (require 'shell) ;; Set up Comint for Shell mode, except ;; `comint-completion-at-point' will be called manually. - (let (completion-at-point-functions) - (shell-completion-vars)))) + (shell-completion-vars) + (remove-hook 'completion-at-point-functions #'comint-completion-at-point t))) (evil-ex-define-argument-type shell "Shell argument type, supports completion." diff --git a/evil-macros.el b/evil-macros.el index 09b13966eb..0f7fd59ef5 100644 --- a/evil-macros.el +++ b/evil-macros.el @@ -759,13 +759,13 @@ via KEY-VALUE pairs. BODY should evaluate to a list of values. '(("(\\(evil-\\(?:ex-\\)?define-\ \\(?:[^ k][^ e][^ y]\\|[-[:word:]]\\{4,\\}\\)\\)\ \\>[ \f\t\n\r\v]*\\(\\(?:\\sw\\|\\s_\\)+\\)?" - (1 font-lock-keyword-face) - (2 font-lock-function-name-face nil t)) + (1 'font-lock-keyword-face) + (2 'font-lock-function-name-face nil t)) ("(\\(evil-\\(?:delay\\|narrow\\|signal\\|save\\|with\\(?:out\\)?\\)\ \\(?:-[-[:word:]]+\\)?\\)\\>\[ \f\t\n\r\v]+" - 1 font-lock-keyword-face) + 1 'font-lock-keyword-face) ("(\\(evil-\\(?:[-[:word:]]\\)*loop\\)\\>[ \f\t\n\r\v]+" - 1 font-lock-keyword-face)))) + 1 'font-lock-keyword-face)))) (provide 'evil-macros) diff --git a/evil-vars.el b/evil-vars.el index 7adbb60c8f..aa9713e06c 100644 --- a/evil-vars.el +++ b/evil-vars.el @@ -2057,8 +2057,8 @@ 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."))