GNU bug report logs -
#15862
aliases to macros at compile time
Previous Next
Full log
Message #1 received at quiet <at> debbugs.gnu.org (full text, mbox):
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.
This bug report was last modified 3 years and 139 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.