From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: About the usage of `with-eval-after-load'. Date: Sun, 19 Sep 2021 09:55:57 +0800 Message-ID: References: <87pmt5xvv9.fsf@web.de> <87k0jdxric.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3217"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 19 03:56:55 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRm4c-0000dt-Vz for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 19 Sep 2021 03:56:55 +0200 Original-Received: from localhost ([::1]:59076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRm4W-0002Vr-FT for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 18 Sep 2021 21:56:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRm3w-0002Uw-Sp for help-gnu-emacs@gnu.org; Sat, 18 Sep 2021 21:56:15 -0400 Original-Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:36656) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRm3u-00043w-Dr for help-gnu-emacs@gnu.org; Sat, 18 Sep 2021 21:56:11 -0400 Original-Received: by mail-lf1-x129.google.com with SMTP id c8so50406374lfi.3 for ; Sat, 18 Sep 2021 18:56:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RYAPqox4G0H1Y1CgMdnRzWw8/iXidmQjGZbVqcR/J/g=; b=UcgrA2hvOsQ3i1dsgeCsjS8/+nu/WpQ/DgnMOi0/T/8MNYj5nnqBHN9stCzimREDt/ 8oj1FvAaqx1M9oXVMs75i8u29ebXlbS7gNgJeJwoWMkcCxk3sI9vRVBhArGBR+Q9EUSU dqG3hA/5R8d80HkjEhg5RF1RAQQUW9jzf6ufL4flaGM1p1GF9GQeHy20zG/0kV0CzO/B t2dmJnoCMVeRLascUF1mYEKGYNRdOcuZB1L+oOgjhTI6GgrFbQPgvi8vMPGlq4kRL8Qy 79m9YdVjjiMhjb12/Z1WVqzHWPbxKzIX2gE770eu9IVi6rplpHcjUi3r3bPlcQjrf3rg DyWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RYAPqox4G0H1Y1CgMdnRzWw8/iXidmQjGZbVqcR/J/g=; b=qV/keThibt074phcWvg+YO/dfdNCS3vId5fJVbY/HyjEVqmSeM2B5f059AIOXBNVnc jAsSdk2teOZqb4+XFmxgUKxuEIPqPNFORwIUsrtWMA57peJ+Jr+XQzaRy7oTuBAHJ3Lk vDMR0IeJqap4iMu4DvtW1BIKrDpE923h5ocg6XaDBBUEDBFcnvX2ttTLIabJqHEeSMkb 4AIq3rrill8h0OqF0/2V3aUIzMnWucTHoKus3nk0bnusokUizGSt0omYPz8tgJo87Wfk /jQUQF1Q4+/oM8TAWf0jjhtC3l78VQQioNYe/UqyikTWX6S0XUbZ7I3x6cUm45JEErDx Bbgw== X-Gm-Message-State: AOAM532KsiVrqeZ5KNrRENar5iFTvUkY5nCld2YY894hsQhm75WNXCAG QXxNQnmc3X5Qdj4wpVU7GoKfKv9Jq9FocaR3k2s= X-Google-Smtp-Source: ABdhPJwPaDam5QpZjrKz1p85gcvd1gUHB584OLILrkfgnnqYbBAD0vaz9Tqi3QFhTCOKCRgTeQSdeePSGPRa7eDFVCU= X-Received: by 2002:a05:6512:96f:: with SMTP id v15mr13428073lft.455.1632016568618; Sat, 18 Sep 2021 18:56:08 -0700 (PDT) In-Reply-To: <87k0jdxric.fsf@web.de> Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x129.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133094 Archived-At: On Sun, Sep 19, 2021 at 9:51 AM Michael Heerdegen wrote: > > Hongyi Zhao writes: > > > > `macroexpand' your macro call. > > > > `C-j' gives the following: > > > > (macroexpand > > '(with-eval-after-load > > 'python > > (progn > > (define-key python-mode-map (kbd "C-c TAB") 'hs-toggle-hiding) > > (add-to-list > > 'python-shell-completion-native-disabled-interpreters "jupyter")) > > > > 'elpy (pyvenv-activate "~/.pyenv/versions/datasci"))) > > (eval-after-load 'python (lambda nil (progn (define-key > > python-mode-map ... ...) (add-to-list ... "jupyter")) 'elpy > > (pyvenv-activate "~/.pyenv/versions/datasci"))) > > ... which shows that everything ends in one lambda, called after loading > "python". So, my usage is wrong. Best, HZ