From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: Deny keymap changes made by `evil-integration' Date: Mon, 27 Jul 2015 14:09:35 -0700 Message-ID: References: <83lhe41msl.fsf@gnu.org> <83k2to1knz.fsf@gnu.org> <83io981ihk.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1438031414 15093 80.91.229.3 (27 Jul 2015 21:10:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jul 2015 21:10:14 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 27 23:10:14 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZJpf3-0006aQ-DG for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Jul 2015 23:10:13 +0200 Original-Received: from localhost ([::1]:55547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJpf2-0000CW-H9 for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Jul 2015 17:10:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJpem-00009T-Gl for help-gnu-emacs@gnu.org; Mon, 27 Jul 2015 17:09:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJpel-0000E0-DH for help-gnu-emacs@gnu.org; Mon, 27 Jul 2015 17:09:56 -0400 Original-Received: from mail-ob0-x229.google.com ([2607:f8b0:4003:c01::229]:34334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJpel-0000Db-95 for help-gnu-emacs@gnu.org; Mon, 27 Jul 2015 17:09:55 -0400 Original-Received: by obre1 with SMTP id e1so69516960obr.1 for ; Mon, 27 Jul 2015 14:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=soOV6B3srRO0KUKszjvx3d98ZzXa2sVWOXHsUCX7aIo=; b=VDiwPfTNwZUipaR2T0rbPFF5Ke9LWVXDbbAWrgl2a2ripbBS93w5s83pg7laNggk2y QFwLRDDLPrAIJcbi0410U0KTzJBH5noea8PLgGC68MIwd/L/NtQtyKMkg0jxBDQ3KPMm 3K9wgBEBBZPTQkzU5so3r/EujdAkHwuqj1TxirTKowTp1XyK7/7hX7l/9Mjn6rEv4iHp rPBHKP2fwziHJx89lZU/GT6ptF+UrVPkGBY9g5p4b+YuYw28CgrZAzvL7tNXM6Hgjg4N Jy+C3iuipWuDG5UckC96N7rmMNCcUkLasefbllrW3rxXKPcjpZDnRsbUgZxOybO83924 FQQw== X-Received: by 10.60.141.42 with SMTP id rl10mr29547169oeb.25.1438031394649; Mon, 27 Jul 2015 14:09:54 -0700 (PDT) Original-Received: by 10.76.168.70 with HTTP; Mon, 27 Jul 2015 14:09:35 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::229 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106036 Archived-At: >>> 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