Skip to content

Commit

Permalink
Remove advice for handling eat-yank in eat-eshell-emacs-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Haxxflaxx committed Nov 16, 2024
1 parent 3bd6b0e commit ba02864
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions meow-shims.el
Original file line number Diff line number Diff line change
Expand Up @@ -492,27 +492,26 @@ Argument ENABLE non-nil means turn on."
(remove-hook 'meow-insert-enter-hook #'eat-eshell-char-mode t)
(remove-hook 'meow-insert-exit-hook #'eat-eshell-emacs-mode t))

(defun meow--eat-eshell-run-in-semi-char (command &rest args)
(defun meow--eat-eshell-yank-in-semi-char ()
"Temporarily swap into `eat-eshell-semi-char-mode' to run a
command that normally can't run in `eat-eshell-emacs-mode'."
(if meow--eat-eshell-mode-override
(progn (eat-eshell-semi-char-mode)
(apply command args)
(eat-eshell-emacs-mode))
(apply command args)))
(interactive)
(eat-eshell-semi-char-mode)
(eat-yank)

Check warning on line 500 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

the function ‘eat-yank’ is not known to be defined.
(eat-eshell-emacs-mode))

(defun meow--setup-eat-eshell (enable)
(setq meow--eat-eshell-setup enable)
(if enable
(progn (add-hook 'eat-eshell-exec-hook #'meow--eat-eshell-mode-override-enable)
(add-hook 'eat-eshell-exit-hook #'meow--eat-eshell-mode-override-disable)
(add-hook 'eat-eshell-exit-hook #'meow--update-cursor)
(advice-add 'meow-yank :around #'meow--eat-eshell-run-in-semi-char))
(define-key eat-eshell-emacs-mode-map (kbd "C-y") #'meow--eat-eshell-yank-in-semi-char))

(remove-hook 'eat-eshell-exec-hook #'meow--eat-eshell-mode-override-enable)
(remove-hook 'eat-eshell-exit-hook #'meow--eat-eshell-mode-override-disable)
(remove-hook 'eat-eshell-exit-hook #'meow--update-cursor)

Check warning on line 513 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (26.3, true)

define-key called with 4 arguments, but accepts only 3

Check warning on line 513 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

define-key called with 4 arguments, but accepts only 3

Check warning on line 513 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

define-key called with 4 arguments, but accepts only 3
(advice-remove 'meow-yank #'meow--eat-eshell-run-in-semi-char)))
(define-key eat-eshell-emacs-mode-map (kbd "C-y") #'meow--eat-eshell-yank-in-semi-char t)))

Check warning on line 514 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (26.3, true)

reference to free variable ‘eat-eshell-emacs-mode-map’

Check warning on line 514 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (27.1, true)

reference to free variable ‘eat-eshell-emacs-mode-map’

Check warning on line 514 in meow-shims.el

View workflow job for this annotation

GitHub Actions / check (28.2, true)

reference to free variable ‘eat-eshell-emacs-mode-map’

;; Enable / Disable shims

Expand Down

0 comments on commit ba02864

Please sign in to comment.