help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deny keymap changes made by `evil-integration'


From: John Mastro
Subject: Re: Deny keymap changes made by `evil-integration'
Date: Mon, 27 Jul 2015 14:09:35 -0700

>>> Still I have 2 problems with this.  First of all, shouldn't there
>>> be an infinite recursion here (with-eval-after-load/load combo)?
>>> Secondly, `evil-integration' wraps it's configurations for `dired'
>>> also with `eval-after-load'; doesn't this mean that reloading `dired'
>>> will not change anything because the wrapped snippet (from
>>> `evil-integration') will execute again?
>>
>> Nothing that (let (after-load-alist) (load "...")) couldn't solve.
>>
>
> Nice trick!  Thanks, Eli.

You can use Eli's suggestions to put together something like the below
that's fairly clean/simple and avoids all the repetition of spelling it
out for each mode.

You may have already done this but throwing it out there just in case.

    (defun defeat-evil (modes)
      (eval-after-load 'evil
        `(progn
           ,@(mapcar (lambda (mode)
                       `(eval-after-load ',mode
                          (let (after-load-alist)
                            (load ,(symbol-name mode)))))
                     modes))))

    (defeat-evil '(dired whatever))

-- 
john



reply via email to

[Prev in Thread] Current Thread [Next in Thread]