From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexander Shukaev Newsgroups: gmane.emacs.help Subject: Re: Deny keymap changes made by `evil-integration' Date: Tue, 28 Jul 2015 15:28:32 +0200 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 1438090129 5736 80.91.229.3 (28 Jul 2015 13:28:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2015 13:28:49 +0000 (UTC) Cc: help-gnu-emacs To: John Mastro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 28 15:28:48 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 1ZK4w3-0007OK-MP for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jul 2015 15:28:47 +0200 Original-Received: from localhost ([::1]:58766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK4w3-0004md-5F for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jul 2015 09:28:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK4vq-0004m7-R4 for help-gnu-emacs@gnu.org; Tue, 28 Jul 2015 09:28:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK4vq-00080C-02 for help-gnu-emacs@gnu.org; Tue, 28 Jul 2015 09:28:34 -0400 Original-Received: from mail-lb0-x22e.google.com ([2a00:1450:4010:c04::22e]:33066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK4vp-0007z5-O1 for help-gnu-emacs@gnu.org; Tue, 28 Jul 2015 09:28:33 -0400 Original-Received: by lbbyj8 with SMTP id yj8so74653215lbb.0 for ; Tue, 28 Jul 2015 06:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fA7KTpvDcj5OjpJjgeNsZUBWWAGyy+OMStZQuAw+Bik=; b=p5IP9ZU+DaaoYirmD+uhc+KnMX03sAO9Vt9H1UF/YiCDZS1fLtsQiGFV95JjKh5gKh XehuohuFGdg/vSRAkxIWCISeis4zpu1ZEO+qcvn4euR15izwcdsk2OJjr3dtZPypLxsm oA9vfLrQgcUc7vXNps24tDL1WdzF9CSmUPHWx043BUDIASefJ4QW74pmB+2hfLLoPrOP bvCqw2FZRT9TnExhlac7DfmpQgiWXHjQf1VJJrN7T8ed0wDE/quI74HLvv0I6k7wz9pj k0XpXH2vIOsRWW64kOzJ7+YG00U92FiUDBthXtICFDlpaO1MbIGBO0ADA4vAn4ytDYZr boEA== X-Received: by 10.112.199.133 with SMTP id jk5mr33512609lbc.32.1438090112186; Tue, 28 Jul 2015 06:28:32 -0700 (PDT) Original-Received: by 10.112.148.33 with HTTP; Tue, 28 Jul 2015 06:28:32 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22e 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:106065 Archived-At: > 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 > Thanks, John, handy macro indeed. One question though, why did you decide to make it a macro rather than function? Any advantages in this case?