Revert de0b62b604
On top of reverting the change, it relies on an intern backport of the old evil-delay macro to avoid issues with CI.
This commit is contained in:
parent
0f558f36c1
commit
ac2862cfb0
|
@ -676,6 +676,16 @@ modes in the current buffer."
|
||||||
nil "^[^.]")))))
|
nil "^[^.]")))))
|
||||||
(find-file (evil-collection--mode-file mode "README.org")))
|
(find-file (evil-collection--mode-file mode "README.org")))
|
||||||
|
|
||||||
|
(defun evil-collection--delay (condition form hook &optional append local name)
|
||||||
|
"Execute FORM when CONDITION becomes true, checking with HOOK.
|
||||||
|
NAME specifies the name of the entry added to HOOK. If APPEND is
|
||||||
|
non-nil, the entry is appended to the hook. If LOCAL is non-nil,
|
||||||
|
the buffer-local value of HOOK is modified.
|
||||||
|
|
||||||
|
This is a backport of `evil-delay' without the deprecation notice to deal with CI until migration can be done.
|
||||||
|
Ref: https://github.com/emacs-evil/evil-collection/issues/750"
|
||||||
|
(eval `(evil-with-delay ,condition (,hook ,append ,local ,name) ,form) t))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(cl-defun evil-collection-translate-minor-mode-key (states modes
|
(cl-defun evil-collection-translate-minor-mode-key (states modes
|
||||||
&rest translations
|
&rest translations
|
||||||
|
@ -707,16 +717,22 @@ invocation."
|
||||||
(dolist (mode-symbol modes)
|
(dolist (mode-symbol modes)
|
||||||
(let ((keymap-symbol (intern (format "%S-map" mode-symbol))))
|
(let ((keymap-symbol (intern (format "%S-map" mode-symbol))))
|
||||||
(dolist (state states)
|
(dolist (state states)
|
||||||
(evil-with-delay `(and (boundp ',keymap-symbol)
|
(let ((hook-name
|
||||||
(keymapp ,keymap-symbol))
|
(symbol-name
|
||||||
`(after-load-functions
|
(cl-gensym
|
||||||
|
(format "evil-collection-translate-key-in-%s" keymap-symbol)))))
|
||||||
|
(evil-collection--delay `(and (boundp ',keymap-symbol)
|
||||||
|
(keymapp ,keymap-symbol))
|
||||||
|
`(evil-collection--translate-minor-mode-key
|
||||||
|
',state
|
||||||
|
',mode-symbol
|
||||||
|
',translations
|
||||||
|
,destructive)
|
||||||
|
'after-load-functions
|
||||||
t
|
t
|
||||||
nil
|
nil
|
||||||
(symbol-name
|
hook-name))))))
|
||||||
(cl-gensym
|
|
||||||
(format "evil-collection-translate-key-in-%s" ,keymap-symbol))))
|
|
||||||
(evil-collection--translate-minor-mode-key state mode-symbol
|
|
||||||
translations destructive))))))
|
|
||||||
|
|
||||||
(defun evil-collection--translate-minor-mode-key (state
|
(defun evil-collection--translate-minor-mode-key (state
|
||||||
mode-symbol
|
mode-symbol
|
||||||
|
@ -812,16 +828,22 @@ invocation."
|
||||||
(setq states (list states)))
|
(setq states (list states)))
|
||||||
(dolist (keymap-symbol keymaps)
|
(dolist (keymap-symbol keymaps)
|
||||||
(dolist (state states)
|
(dolist (state states)
|
||||||
(evil-with-delay `(and (boundp ',keymap-symbol)
|
(let ((hook-name
|
||||||
(keymapp ,keymap-symbol))
|
(symbol-name
|
||||||
`(after-load-functions
|
(cl-gensym
|
||||||
t
|
(format "evil-collection-translate-key-in-%s" keymap-symbol)))))
|
||||||
nil
|
(evil-collection--delay `(and (boundp ',keymap-symbol)
|
||||||
(symbol-name
|
(keymapp ,keymap-symbol))
|
||||||
(cl-gensym
|
`(evil-collection--translate-key
|
||||||
(format "evil-collection-translate-key-in-%s" ,keymap-symbol))))
|
',state
|
||||||
(evil-collection--translate-key state keymap-symbol
|
',keymap-symbol
|
||||||
translations destructive)))))
|
',translations
|
||||||
|
,destructive)
|
||||||
|
'after-load-functions
|
||||||
|
t
|
||||||
|
nil
|
||||||
|
hook-name)))))
|
||||||
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defmacro evil-collection-swap-key (states keymaps &rest args)
|
(defmacro evil-collection-swap-key (states keymaps &rest args)
|
||||||
|
|
Loading…
Reference in New Issue