How to advice `evil-delete'

Vegard Øye vegard_oye at hotmail.com
Mon Oct 3 15:29:21 CEST 2011


On 2011-10-03 05:16 +0200, York Zhao wrote:

> The problem is that after I deleted an empty line, I could no longer
> yank anything, whenever I yank I get the errer:
>
> Debugger entered--Lisp error:
> (wrong-type-argument commandp evil-yank)
> call-interactively(evil-yank nil nil)

What does "C-h k y" say? Look for the word "interactive":

    evil-yank is an interactive Lisp function in `evil-operators.el'.
                    ^^^^^^^^^^^

If your advice somehow turned `evil-yank' into a mere function,
it should be indicated here.

Also, try using `defadvice' without the ARGLIST argument:

    (defadvice evil-yank (around around-yank activate)
      ad-do-it)

Although it's possible to advise a function's interactive behavior,
this shouldn't really be an issue with simple advices like above --
`defadvice' is smart enough to recognize commands.

-- 
Vegard



More information about the implementations-list mailing list