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 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: Fri, 31 Oct 2014 17:00:04 UTC

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