From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Irelan Newsgroups: gmane.emacs.bugs Subject: bug#46958: 28.0.50; invalid-function error for macros that have function bindings Date: Sun, 7 Mar 2021 13:38:53 -0800 Message-ID: References: <87pn0co316.fsf@gnus.org> <87h7louzqp.fsf@tcd.ie> <2f63faf5-656a-e9cd-2249-0576da0b9e0c@orcon.net.nz> 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="25746"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Basil L. Contovounesios" , Lars Ingebrigtsen , 46958@debbugs.gnu.org To: Phil Sainty Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 07 22:40:10 2021 Return-path: Envelope-to: geb-bug-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 1lJ18E-0006ad-6D for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Mar 2021 22:40:10 +0100 Original-Received: from localhost ([::1]:45512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJ18C-00072Q-TB for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Mar 2021 16:40:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJ186-000711-7l for bug-gnu-emacs@gnu.org; Sun, 07 Mar 2021 16:40:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58362) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJ186-0002Pa-0M for bug-gnu-emacs@gnu.org; Sun, 07 Mar 2021 16:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJ185-0001N1-Sn for bug-gnu-emacs@gnu.org; Sun, 07 Mar 2021 16:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Irelan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Mar 2021 21:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46958 X-GNU-PR-Package: emacs Original-Received: via spool by 46958-submit@debbugs.gnu.org id=B46958.16151531685216 (code B ref 46958); Sun, 07 Mar 2021 21:40:01 +0000 Original-Received: (at 46958) by debbugs.gnu.org; 7 Mar 2021 21:39:28 +0000 Original-Received: from localhost ([127.0.0.1]:41675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJ17X-0001M4-O3 for submit@debbugs.gnu.org; Sun, 07 Mar 2021 16:39:27 -0500 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:33870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJ17V-0001Lo-PN for 46958@debbugs.gnu.org; Sun, 07 Mar 2021 16:39:26 -0500 Original-Received: by mail-wr1-f53.google.com with SMTP id u16so9366135wrt.1 for <46958@debbugs.gnu.org>; Sun, 07 Mar 2021 13:39:25 -0800 (PST) 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 :cc; bh=cyK17heCuFsW+Odmk4s4UIyb0aHzaktCL9V/Oa6QSeo=; b=EsPe3yfHytcTYfjIUbSgvc/VQ1PnEz1pmnw+BJcIM1K/wjKuDyTNHrBsz0K6FbPtPD Yj+KrGiOjLpPeS9hWqsziJxcoXe41r/gje5peDsLGlIyjx+ArJYEUQl2PSNtbQa/rmMC ujyG2MVgFafMQwfe6qgx7bNdET9+sASFDC+3RktP7Jyw/XjUX8ER0hnb6XNBane48myZ WHbBhFNAzQheONQ9P3L6pSMKgt9Ft0OOVf0+daCeO4qwlWNsMRNLJ9qsUvFp+YfYBV8p QVPkaF3f/dV8jbMc9xaW5T6HXsQkJVTBeGxJuSPFTk97aQbkd+mmztM3ajEUrQeV/gkr xYcQ== 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:cc; bh=cyK17heCuFsW+Odmk4s4UIyb0aHzaktCL9V/Oa6QSeo=; b=bH6TSGNUZ6GJHymtKl+Bty4oSpGdasj7tS/dFESpWZ6Dd2JpSLqV2lFxaIttKZFVxo uXXUvrOLmHgytMS7SfcQf5nyHCCN6kMRVs72qGm4Lcor2n9qZojNyYdFGgH2Qbw6K1N1 d4+8J4mN89/7TnwAFnhr9lS6vZv8HH1aaS65cNSJH5rPqFgV9nGxgy3fkt8xLy0gJfD+ eZqYKpy1TcHo9grg9MuPhYDxgvqVs6BUW0I6BbkhKTRj8XP1Sla0Z/UxDXhPcnpsgSx8 kLPRlfcrJfvOgBHxv4C2o9GY0fMdw9s9jq5viSyTIl0u+RJ9U6q14VVwwwhbyVIu5pcI SIBA== X-Gm-Message-State: AOAM533PRti9Wn3VPlxSFPfGRgx5iowsPPU+lY1sROR6TZj8mX7IDDTM w86KfoMJxFI/Qki1+A61GZ0DAUmWqS8ksM+SUQ== X-Google-Smtp-Source: ABdhPJz5QBXTI1PfhiQCkt7B8tjmCc6vV5GNaBof7unO/Seu5cV7WVRxuPxabIDlorjRsgCxVgNSDQ7gzpDVs9OiwuQ= X-Received: by 2002:a5d:4e52:: with SMTP id r18mr20914121wrt.28.1615153159736; Sun, 07 Mar 2021 13:39:19 -0800 (PST) In-Reply-To: <2f63faf5-656a-e9cd-2249-0576da0b9e0c@orcon.net.nz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201788 Archived-At: No, that results in a circular import. The way this file (not my code, by the way) seems to work is that it started out as one file, org-fc.el, that contained everything. At various points, they decided to break out some parts of the file into separate files like this: ``` ;;; org-fc.el ;; ... some definitions, including macro `org-fc-with-point-at-back-heading' and the other `org-fc' symbols mentioned in org-fc-type-normal.el (require 'org-fc-type-normal) ;; ... some more definitions (provide 'org-fc) ``` ``` ;;; org-fc-type-normal.el (defun org-fc-type-normal-init () "Mark headline as card of the normal type." (interactive) (org-fc--init-card "normal") (org-fc-review-data-update '("front"))) (defun org-fc-type-normal-setup (_position) "Prepare a normal card for review." (interactive) ;; Make sure the card is collapsed (outline-hide-subtree) (when (org-fc-has-back-heading-p) (org-show-entry) ;; Make sure the back heading is visible (org-fc-with-point-at-back-heading (org-show-set-visibility 'minimal)))) (defun org-fc-type-normal-flip () "Flip a normal card." (interactive) (org-show-entry) (org-show-children) ;; NOTE: the body only runs if the card has a back heading (org-fc-with-point-at-back-heading (org-show-entry) (org-show-children) (org-fc-show-latex))) (org-fc-register-type 'normal 'org-fc-type-normal-setup 'org-fc-type-normal-flip 'org-fc-noop) ;;; Footer (provide 'org-fc-type-normal) ``` Note that `org-fc-type-normal.el` doesn't `require` anything from `org-fc`, but assumes that they have been already defined by the time `org-fc.el` runs the `require` call. On Sat, Mar 6, 2021 at 2:39 PM Phil Sainty wrote: > > On 7/03/21 7:28 am, Robert Irelan wrote: > > The call that's actually failing is located here: > > https://git.sr.ht/~l3kn/org-fc/tree/711511192c62f6dccc96644dcf0705fda99e753a/item/org-fc-type-normal.el#L41. > > It looks like org-fc-type-normal.el should (require 'org-fc) > at the start. > > Does that fix the problem? > -- Robert Irelan rirelan@gmail.com