GNU bug report logs - #15862
aliases to macros at compile time

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Glenn Morris <rgm@HIDDEN>; dated Mon, 11 Nov 2013 20:04:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 15862 <at> debbugs.gnu.org:


Received: (at 15862) by debbugs.gnu.org; 26 Jan 2022 17:19:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 26 12:19:27 2022
Received: from localhost ([127.0.0.1]:53361 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nClx9-00065w-BL
	for submit <at> debbugs.gnu.org; Wed, 26 Jan 2022 12:19:27 -0500
Received: from quimby.gnus.org ([95.216.78.240]:50056)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nClx6-00065Z-Vm
 for 15862 <at> debbugs.gnu.org; Wed, 26 Jan 2022 12:19:25 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Wek/KK7aUep0zX0DDpRPJTwj6Y8R+uZrZPlUeAQhUUg=; b=MHxkjiJZY7wejLtWjf0PL7Ywiq
 jzPzNlUUugD64sQPEYDOcl9eJ2QY6dPVlIINBsDG25ZFclPHRJpNCW5cywX47Zga+kBCCECh6sLQw
 P/xgeqWIi2pwkh/x78lCAguEEGKGi/q4+F0PMz+FMcmFftekwmoYxjlRhWBTlvNdpcBk=;
Received: from [84.212.220.105] (helo=giant)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1nClwq-0004BK-Es; Wed, 26 Jan 2022 18:19:10 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#15862: aliases to macros at compile time
References: <wrtxfiogeb.fsf@HIDDEN> <871rvo5zct.fsf@HIDDEN>
 <87mu6nyk46.fsf@HIDDEN> <af5zdboexm.fsf@HIDDEN>
X-Now-Playing: Nina Simone's _Little Girl Blue_: "Mood Indigo"
Date: Wed, 26 Jan 2022 18:19:07 +0100
In-Reply-To: <af5zdboexm.fsf@HIDDEN> (Glenn Morris's message of
 "Mon, 04 May 2020 12:14:29 -0400")
Message-ID: <87ilu6pg8k.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Glenn Morris <rgm@HIDDEN> writes: > The invalid function
 issue remains. > > As in the original report: > Compile the file, load the
 compiled version, *then evaluate: (foo-fails)*. I can confirm that this issue
 is still present in Emacs 29. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 15862
Cc: stefan@HIDDEN, 15862 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Glenn Morris <rgm@HIDDEN> writes:

> The invalid function issue remains.
>
> As in the original report:
> Compile the file, load the compiled version, *then evaluate: (foo-fails)*.

I can confirm that this issue is still present in Emacs 29.

To reproduce, save the file, byte-compile it and say

M-: (foo-fails)

Debugger entered--Lisp error: (invalid-function old-mac)
  old-mac()
  foo-fails()
  eval-expression((foo-fails) nil nil 127)
  funcall-interactively(eval-expression (foo-fails) nil nil 127)
  command-execute(eval-expression)

Perhaps Stefan M has some comments; added to the CCs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

--=-=-=
Content-Type: application/emacs-lisp
Content-Disposition: attachment; filename=foo.el
Content-Transfer-Encoding: quoted-printable

(defvar foo-var 0)

(defmacro foo-mac ()
  '(setq foo-var (1+ foo-var)))

(define-obsolete-function-alias 'old-mac #'foo-mac "24.4")

(defun foo-fails ()
  (old-mac))

(defun foo-works ()
  (foo-mac))


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15862; Package emacs. Full text available.

Message received at 15862 <at> debbugs.gnu.org:


Received: (at 15862) by debbugs.gnu.org; 4 May 2020 16:14:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 04 12:14:38 2020
Received: from localhost ([127.0.0.1]:33792 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jVdjq-0006BK-5d
	for submit <at> debbugs.gnu.org; Mon, 04 May 2020 12:14:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37744)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rgm@HIDDEN>) id 1jVdjp-0006B9-JS
 for 15862 <at> debbugs.gnu.org; Mon, 04 May 2020 12:14:37 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:33756)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <rgm@HIDDEN>)
 id 1jVdjj-0004ob-Sg; Mon, 04 May 2020 12:14:31 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1jVdji-0000lS-5T; Mon, 04 May 2020 12:14:30 -0400
From: Glenn Morris <rgm@HIDDEN>
To: 15862 <at> debbugs.gnu.org
Subject: Re: bug#15862: Status: aliases to macros at compile time
References: <wrtxfiogeb.fsf@HIDDEN> <871rvo5zct.fsf@HIDDEN>
 <87mu6nyk46.fsf@HIDDEN>
X-Spook: quarter Mara salvatrucha Panama Disaster Closure George
X-Ran: 0>h$A^=R8!&Ew=j{e,E)dbQ1K:xY~Dz7|n|NNcc!6M$]=ZWHeF7x]k0K]9eEq!Ftt*7>&3
X-Hue: black
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Mon, 04 May 2020 12:14:29 -0400
In-Reply-To: <87mu6nyk46.fsf@HIDDEN> (Stefan Kangas's message of
 "Mon, 04 May 2020 14:12:25 +0200")
Message-ID: <af5zdboexm.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 15862
Cc: larsi@HIDDEN, stefan@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


The invalid function issue remains.

As in the original report:
Compile the file, load the compiled version, *then evaluate: (foo-fails)*.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15862; Package emacs. Full text available.
bug Marked as found in versions 27.1. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 15862-done <at> debbugs.gnu.org:


Received: (at 15862-done) by debbugs.gnu.org; 4 May 2020 12:12:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 04 08:12:35 2020
Received: from localhost ([127.0.0.1]:59214 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jVZxa-0003WE-T2
	for submit <at> debbugs.gnu.org; Mon, 04 May 2020 08:12:35 -0400
Received: from ted.gofardesign.uk ([67.225.143.91]:49510)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefan@HIDDEN>) id 1jVZxY-0003Vz-Nv
 for 15862-done <at> debbugs.gnu.org; Mon, 04 May 2020 08:12:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; 
 s=default;
 h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Hrw3D5mWR25mhJG31+XU/PJrz/+Ot24ySCxB1YF2wQ4=; b=EY6AkmY8jUaPjvBxhtj3EimYmg
 CrOj/7U8zxqhJVstC9KedD1qolTkWUOP+dc0VzNKKD5m2Opley6IOjNQLX/ZzINR2JgROBIMW5KgZ
 3IEndrbVD9WLG1PZ4MJU+mBQvtXDE2v0eq0UYscvtYEE8IvztGBqWurjTeWGTXeRV9Qpyxyf/wuR6
 5ckJi4bRGlqhBR5HWUseNi6LS6hU6Y0oj7CCcChY/jptlHGVe7nfiC0fTZnc5bGFwfnDPXmP07Kua
 1qhAfTaRKbSLAIzsHpiaAYDB3e++Bm4R4hr2z8Ok7/vFEObuE5MaYwH8ybiAfrWSSGX9F6BS0Obz+
 Gjer/KbQ==;
Received: from h-4-70-69.a785.priv.bahnhof.se ([155.4.70.69]:40598
 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93)
 (envelope-from <stefan@HIDDEN>)
 id 1jVZxT-001hbI-9W; Mon, 04 May 2020 08:12:27 -0400
From: Stefan Kangas <stefan@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#15862: Status: aliases to macros at compile time
In-Reply-To: <871rvo5zct.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Mon,
 07 Oct 2019 17:50:26 +0200")
References: <wrtxfiogeb.fsf@HIDDEN> <871rvo5zct.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Date: Mon, 04 May 2020 14:12:25 +0200
Message-ID: <87mu6nyk46.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - ted.gofardesign.uk
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - marxist.se
X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id:
 stefan@HIDDEN
X-Authenticated-Sender: ted.gofardesign.uk: stefan@HIDDEN
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 15862-done
Cc: bug#15862 <15862-done <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> I don't get anything about invalid functions.  So has this been fixed,
> or am I misinterpreting what the invalid function issue is?

More information was requested, but none was given within 6 months, so
I'm closing this bug.

If this is still an issue, please reply to this email (use "Reply to
all" in your email client) and we can reopen the bug report.

Best regards,
Stefan Kangas




Notification sent to Glenn Morris <rgm@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Stefan Kangas <stefan@HIDDEN>:
You have taken responsibility. Full text available.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 15862 <at> debbugs.gnu.org:


Received: (at 15862) by debbugs.gnu.org; 7 Oct 2019 15:50:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 07 11:50:35 2019
Received: from localhost ([127.0.0.1]:48925 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iHVHP-0001yt-8Z
	for submit <at> debbugs.gnu.org; Mon, 07 Oct 2019 11:50:35 -0400
Received: from quimby.gnus.org ([80.91.231.51]:40638)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iHVHN-0001yl-Mx
 for 15862 <at> debbugs.gnu.org; Mon, 07 Oct 2019 11:50:34 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>) id 1iHVHG-0005Kh-Dw
 for 15862 <at> debbugs.gnu.org; Mon, 07 Oct 2019 17:50:32 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: bug#15862 <15862 <at> debbugs.gnu.org>
Subject: Re: Status: aliases to macros at compile time
Date: Mon, 07 Oct 2019 17:50:26 +0200
In-Reply-To: bug's message of "Mon\, 07 Oct 2019 15\:47\:40 +0000"
Message-ID: <871rvo5zct.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  This bug report also comes out blank in the mbox interface, 
 but is displayed on the web. [...] ----- 
 Content analysis details:   (-1.4 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
 1.5 FAKE_REPLY_C           No description available.
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 15862
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This bug report also comes out blank in the mbox interface, but is
displayed on the web.

[...]

-----

(defvar foo-var 0)

(defmacro foo-mac ()
  '(setq foo-var (1+ foo-var)))

(define-obsolete-function-alias 'old-mac #'foo-mac "24.4")

(defun foo-fails ()
  (old-mac))

(defun foo-works ()
  (foo-mac))


Compile:
foo.el:13:4:Warning: the function `foo-mac' is not known to be defined.

Load compiled version:
(foo-fails) ; -> (invalid-function old-mac)


Also, neither version warns that old-mac is obsolete.

I see now that

(eval-and-compile
  (define-obsolete-function-alias 'old-mac #'foo-mac "24.4"))

works. So maybe that should happen automatically at top-level.


[...]

Fixed the obsolescence warning in 5e6fb1e (auto eval-and-compile make-obsol=
ete.
The invalid function issue remains (still need to manaully eval
top-level aliases to macros at compile-time).

-----

Then I compile it in Emacs 27, I get:

Compiling file /tmp/c.el at Mon Oct  7 17:45:55 2019

In foo-fails:
c.el:9:4:Warning: =E2=80=98old-mac=E2=80=99 is an obsolete function (as of =
24.4); use
    =E2=80=98foo-mac=E2=80=99 instead.

Which seems correct.

If I then

(load "/tmp/c.elc")

I don't get anything about invalid functions.  So has this been fixed,
or am I misinterpreting what the invalid function issue is?

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15862; Package emacs. Full text available.

Message received at 15862-quiet <at> debbugs.gnu.org:


Received: (at 15862-quiet) by debbugs.gnu.org; 22 Dec 2017 00:01:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 21 19:01:20 2017
Received: from localhost ([127.0.0.1]:46605 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eSAm8-0004rb-2S
	for submit <at> debbugs.gnu.org; Thu, 21 Dec 2017 19:01:20 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33487)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rgm@HIDDEN>) id 1eSAm6-0004rL-RF
 for 15862-quiet <at> debbugs.gnu.org; Thu, 21 Dec 2017 19:01:19 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rgm@HIDDEN>) id 1eSAm0-0007NY-Vw
 for 15862-quiet <at> debbugs.gnu.org; Thu, 21 Dec 2017 19:01:13 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33993)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rgm@HIDDEN>)
 id 1eSAm0-0007NS-Su
 for 15862-quiet <at> debbugs.gnu.org; Thu, 21 Dec 2017 19:01:12 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1eSAly-0002w5-Hm; Thu, 21 Dec 2017 19:01:10 -0500
From: Glenn Morris <rgm@HIDDEN>
To: 15862-quiet <at> debbugs.gnu.org
Subject: Re: aliases to macros at compile time
References: <wrtxfiogeb.fsf@HIDDEN>
X-Spook: EBS Virual Hemorrhagic Fever Brush fire Disaster
X-Ran: @9Bu][RzRyz1G4]cr3IhWm(J{xdn%AgD\\Rn_ka}|fo^Ef[xdJE;_6[ULuC9ZrKERG$gI7
X-Hue: green
X-Attribution: GM
Date: Thu, 21 Dec 2017 19:01:10 -0500
In-Reply-To: <wrtxfiogeb.fsf@HIDDEN> (Glenn Morris's message of
 "Mon, 11 Nov 2013 15:03:08 -0500")
Message-ID: <iqa7ybmy0p.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 15862-quiet
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)


Fixed the obsolescence warning in 5e6fb1e (auto eval-and-compile make-obsolete.
The invalid function issue remains (still need to manaully eval
top-level aliases to macros at compile-time).




Message received at quiet <at> debbugs.gnu.org:


Received: (at quiet) by debbugs.gnu.org; 11 Nov 2013 20:03:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 11 15:03:11 2013
Received: from localhost ([127.0.0.1]:47391 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VfxhX-0000QD-0j
	for submit <at> debbugs.gnu.org; Mon, 11 Nov 2013 15:03:11 -0500
Received: from fencepost.gnu.org ([208.118.235.10]:44039 ident=Debian-exim)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rgm@HIDDEN>) id 1VfxhV-0000Q5-Cy
 for quiet <at> debbugs.gnu.org; Mon, 11 Nov 2013 15:03:09 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.71)
 (envelope-from <rgm@HIDDEN>)
 id 1VfxhU-0002yk-NW; Mon, 11 Nov 2013 15:03:08 -0500
From: Glenn Morris <rgm@HIDDEN>
To: quiet <at> debbugs.gnu.org
Subject: aliases to macros at compile time
X-Spook: unclassified strategic North Korea mindwar JFK nuclear
X-Ran: 5#;J?;*%H%'AQe_I@Xq_0Nb.bqv^!Y>VO:3Tt[Uc{!i<%Kx!1j4eAa+/zzoP.7|PRRZoYr
X-Hue: red
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Mon, 11 Nov 2013 15:03:08 -0500
Message-ID: <wrtxfiogeb.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: quiet
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Package: emacs
Version: 24.3
Severity: minor

[ From http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00354.html ]

(defvar foo-var 0)

(defmacro foo-mac ()
  '(setq foo-var (1+ foo-var)))

(define-obsolete-function-alias 'old-mac #'foo-mac "24.4")

(defun foo-fails ()
  (old-mac))

(defun foo-works ()
  (foo-mac))


Compile:
foo.el:13:4:Warning: the function `foo-mac' is not known to be defined.

Load compiled version:
(foo-fails) ; -> (invalid-function old-mac)


Also, neither version warns that old-mac is obsolete.

I see now that

(eval-and-compile
  (define-obsolete-function-alias 'old-mac #'foo-mac "24.4"))

works. So maybe that should happen automatically at top-level.




Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 26 Jan 2022 17:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.