GNU bug report logs - #11686
24.1.50; defun should return name

Previous Next

Package: emacs;

Reported by: Johan Bockgård <bojohan <at> gnu.org>

Date: Tue, 12 Jun 2012 21:02:02 UTC

Severity: normal

Found in version 24.1.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 11686 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Lawrence Mitchell <wence <at> gmx.li>
Cc: 11686 <at> debbugs.gnu.org
Subject: Re: bug#11686: 24.1.50; defun should return name
Date: Mon, 18 Jun 2012 11:58:09 -0400
>> Maybe a simpler way is to change defalias to return the name rather than
>> the value.
> But defalias says:
> | (defalias SYMBOL DEFINITION &optional DOCSTRING)
> | Set SYMBOL's function definition to DEFINITION, and return DEFINITION.
> So you'll probably then get a bug report about that instead.

We'll see, I just installed a patch that does that.

I don't know of any use-case where the return value of `defalias' is
used, whereas I do know of one use case where the return value of
`defun' is used (it's in (add-hook 'foo-hook (defun bar () ...))).


        Stefan




This bug report was last modified 13 years and 30 days ago.

Previous Next


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