[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil ea552efeeb 3/3: Miscellaneous minor changes
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil ea552efeeb 3/3: Miscellaneous minor changes |
Date: |
Sun, 15 Sep 2024 06:59:38 -0400 (EDT) |
branch: elpa/evil
commit ea552efeeb809898932f55d1690da9cbe8ef5fa1
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Axel Forsman <axel@axelf.se>
Miscellaneous minor changes
* evil-common.el (evil-with-delay): Add comment for last change.
* 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-common.el | 3 +++
evil-ex.el | 12 ++++++------
evil-macros.el | 8 ++++----
3 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/evil-common.el b/evil-common.el
index cd620d4812..f7df526c45 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -59,6 +59,9 @@ If LOCAL is non-nil, the buffer-local value of HOOK is
modified."
(macroexp-let2* nil
((fun-name `(make-symbol
,(or name (format "evil-delay-in-%s" hook-sym))))
+ ;; `apply-partially' is used in case this macro is expanded
+ ;; (via `evil-define-key') in a file which still does not
+ ;; activate `lexical-binding'.
(fun `(apply-partially
(lambda (name &rest _)
(when ,(or condition t)
diff --git a/evil-ex.el b/evil-ex.el
index 3c917f259a..f400036cb6 100644
--- a/evil-ex.el
+++ b/evil-ex.el
@@ -635,13 +635,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."
@@ -668,8 +668,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)