all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Mastro <john.b.mastro@gmail.com>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Deny keymap changes made by `evil-integration'
Date: Mon, 27 Jul 2015 14:09:35 -0700	[thread overview]
Message-ID: <CAOj2CQQTP-i8VoXks_=H18cUtx8PnoNUtQu7GYAgVS2soXVPQQ@mail.gmail.com> (raw)
In-Reply-To: <CAKu-7Wwh4=3gpJJ12YA2=HjzsuNyD7hkBWc4vMfzyC2P0qEOPw@mail.gmail.com>

>>> 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	other threads:[~2015-07-27 21:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-25 11:43 Deny keymap changes made by `evil-integration' Alexander Shukaev
2015-07-25 11:47 ` Eli Zaretskii
2015-07-25 11:58   ` Alexander Shukaev
2015-07-25 12:33     ` Eli Zaretskii
2015-07-25 12:52       ` Alexander Shukaev
2015-07-25 13:20         ` Eli Zaretskii
2015-07-25 13:23           ` Alexander Shukaev
2015-07-27 21:09             ` John Mastro [this message]
2015-07-28 13:28               ` Alexander Shukaev
2015-07-26 12:24           ` Martin Yrjölä
2015-07-26 18:56             ` Alexander Shukaev
2015-07-27 20:46 ` Robert Thorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOj2CQQTP-i8VoXks_=H18cUtx8PnoNUtQu7GYAgVS2soXVPQQ@mail.gmail.com' \
    --to=john.b.mastro@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.