From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Example use of macro to minimize and generalize the code Date: Tue, 1 Jun 2021 23:54:14 +0700 Message-ID: References: <87a6oad81r.fsf@zoho.eu> <87y2buscef.fsf@web.de> <87k0nes9s0.fsf@web.de> <878s3us8le.fsf@web.de> <87fsy1y97e.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21702"; mail-complaints-to="usenet@ciao.gmane.io" To: Michael Heerdegen , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 01 19:12:22 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 1lo7wE-0005Re-DV for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Jun 2021 19:12:22 +0200 Original-Received: from localhost ([::1]:56770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo7wD-0004m0-BH for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Jun 2021 13:12:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo7ev-0003l6-7u for help-gnu-emacs@gnu.org; Tue, 01 Jun 2021 12:54:29 -0400 Original-Received: from mail-ua1-x935.google.com ([2607:f8b0:4864:20::935]:38720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lo7et-0004yT-Cl for help-gnu-emacs@gnu.org; Tue, 01 Jun 2021 12:54:28 -0400 Original-Received: by mail-ua1-x935.google.com with SMTP id d14so8832418ual.5 for ; Tue, 01 Jun 2021 09:54:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=5QIdV5d7IFh/d4OovuZdwkEU+9Iu06sgJSSZoHfFs+U=; b=oV27LIYboDmuEHJop/PTRZx5rt9ZMWq1xS3CkNXZDvwiYrPlnLiRK2jCpiw9eYtqBA daBSsC1ZxwPsfUCrfzdlmhk8l3/AkyoGzNs74AQiknmoEbM2gfrzd5mZt6wX+DrsJdie nWswB0AyJ+GxA1Shj5zVVnlQJ/30wxRFhNWyUur1twbr65THyWGF/FUbrV6TfhIVZp89 AfqcwFAVvO4B6ujBU2wrUhWsEA+YZzlorFgLBlHEphV+VLeUSo99MTXu181jqQnHA0dS dybE5p4vUKw037uq1Bbd7f0X0psAu8lZXQrriolSPeGag1dL4+KYxdgZm6czVeA6J2Ci 172Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=5QIdV5d7IFh/d4OovuZdwkEU+9Iu06sgJSSZoHfFs+U=; b=fxyeXmI31ZwrCDOF5jocSK5Z0qYsNaWSC/q8zBXF47EakQML4id+lsaTKiG1NkUh4E EZU5BAe4pDPbQYM8P730lDzXODgHv+/3N4TnOwrm+XpuxncSqSYxztBp7cNpJZR6F5+x xRKqcPuT8Nra24+ECagCV2Rq6/YoFgq52Da2Wxxaku5FlZLgyn2kbMkeArUFKTNuGsxF hMhISSiZ7OjuizUe0vrKs6IM7Z/JbaJ92gPecNlmCnj5n6idTD3FRWNYIwIdotBE7I+O GnMcwR2Ke8d80zxqE4Vx2+F8gOWzeRrDFFQx0D3H4FIEFYSO4XtAn823lIzeqrjqLcih piaA== X-Gm-Message-State: AOAM5317w4HwJxAgB5lUZsP2iH86b9Z1nAWpxSiw7e75kB6b4GymDrH7 FegjniKiNxF9Xyean/u9YWEGJjqV5NYrsZ7Fzlg= X-Google-Smtp-Source: ABdhPJxG9ISaUINwmqpJxKIf9rfc1jmbxVZV5DFksJO8aUFUJbdcqxUhfaCkpAJ4cBf2wNDWyjtGKgkLQTAX6zNy2hM= X-Received: by 2002:ab0:6cf2:: with SMTP id l18mr9068127uai.86.1622566466295; Tue, 01 Jun 2021 09:54:26 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::935; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x935.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:130463 Archived-At: On Tue, 1 Jun 2021 at 23:38, Jean Louis wrote: > > > (defmacro when-tabulated-id (table &rest body) > > > (declare (indent 2) (debug t)) > > > ;;(ignore id) > > > `(if id > > Why don't you consider to make the id a real argument? > > I wish I could fully understand but I don't, and I consider your > advises important. > > How would I make the ID a real argument? I believe Michael is hinting at this: (defmacro when-tabulated-id (id table &rest body) `(if ,id =E2=80=A6 which means =E2=80=9Cat macro expansion time, substitute the value of the argument to the macro=E2=80=9D, rather than your original (defmacro when-tabulated-id (id table &rest body) `(if id =E2=80=A6 which means =E2=80=9Cat evaluation time, substitute the value of the symbol= 'id=E2=80=9D.