* Re: [Emacs-diffs] trunk r114390: * emacs-lisp/eieio.el (class-parent): Don't use defalias with macros. [not found] <E1VMYS7-0005m6-JR@vcs.savannah.gnu.org> @ 2013-09-19 14:06 ` Stefan Monnier 2013-09-19 16:06 ` Glenn Morris 0 siblings, 1 reply; 3+ messages in thread From: Stefan Monnier @ 2013-09-19 14:06 UTC (permalink / raw) To: Glenn Morris; +Cc: emacs-devel > + * emacs-lisp/eieio.el (class-parent): Don't use defalias with macros. Why not? Stefan ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Emacs-diffs] trunk r114390: * emacs-lisp/eieio.el (class-parent): Don't use defalias with macros. 2013-09-19 14:06 ` [Emacs-diffs] trunk r114390: * emacs-lisp/eieio.el (class-parent): Don't use defalias with macros Stefan Monnier @ 2013-09-19 16:06 ` Glenn Morris 2013-09-19 21:34 ` Stefan Monnier 0 siblings, 1 reply; 3+ messages in thread From: Glenn Morris @ 2013-09-19 16:06 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel Stefan Monnier wrote: >> + * emacs-lisp/eieio.el (class-parent): Don't use defalias with macros. > > Why not? Because it didn't work. (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. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Emacs-diffs] trunk r114390: * emacs-lisp/eieio.el (class-parent): Don't use defalias with macros. 2013-09-19 16:06 ` Glenn Morris @ 2013-09-19 21:34 ` Stefan Monnier 0 siblings, 0 replies; 3+ messages in thread From: Stefan Monnier @ 2013-09-19 21:34 UTC (permalink / raw) To: Glenn Morris; +Cc: emacs-devel >>> + * emacs-lisp/eieio.el (class-parent): Don't use defalias with macros. >> Why not? > Because it didn't work. > (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)) Oh, I see. We should probably fix this, but in any case the code after define-obsolete-function-alias should be changed to use new-mac rather than old-mac. Stefan ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-19 21:34 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <E1VMYS7-0005m6-JR@vcs.savannah.gnu.org> 2013-09-19 14:06 ` [Emacs-diffs] trunk r114390: * emacs-lisp/eieio.el (class-parent): Don't use defalias with macros Stefan Monnier 2013-09-19 16:06 ` Glenn Morris 2013-09-19 21:34 ` Stefan Monnier
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.