From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#11686: 24.1.50; defun should return name Date: Mon, 18 Jun 2012 11:58:09 -0400 Message-ID: References: <87ipewb637.fsf@gnu.org> <87mx47h8wp.fsf@gmx.li> <874nqfl1r2.fsf@gmx.li> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1340046359 15573 80.91.229.3 (18 Jun 2012 19:05:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Jun 2012 19:05:59 +0000 (UTC) Cc: 11686@debbugs.gnu.org To: Lawrence Mitchell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 18 21:05:56 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SghGt-0008Sp-7B for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jun 2012 21:05:55 +0200 Original-Received: from localhost ([::1]:40690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SghGt-0004fh-5c for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jun 2012 15:05:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SghGm-0004fD-Ea for bug-gnu-emacs@gnu.org; Mon, 18 Jun 2012 15:05:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SghGj-0004W2-Uy for bug-gnu-emacs@gnu.org; Mon, 18 Jun 2012 15:05:47 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SghGj-0004VL-8l for bug-gnu-emacs@gnu.org; Mon, 18 Jun 2012 15:05:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SghJt-0002hX-MG for bug-gnu-emacs@gnu.org; Mon, 18 Jun 2012 15:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jun 2012 19:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11686 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11686-submit@debbugs.gnu.org id=B11686.134004653110366 (code B ref 11686); Mon, 18 Jun 2012 19:09:01 +0000 Original-Received: (at 11686) by debbugs.gnu.org; 18 Jun 2012 19:08:51 +0000 Original-Received: from localhost ([127.0.0.1]:47016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SghJj-0002h8-DC for submit@debbugs.gnu.org; Mon, 18 Jun 2012 15:08:51 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:43323) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SghJh-0002h1-JR for 11686@debbugs.gnu.org; Mon, 18 Jun 2012 15:08:50 -0400 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q5IJ5VJ0009425; Mon, 18 Jun 2012 15:05:31 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 6DE5EB4253; Mon, 18 Jun 2012 11:58:09 -0400 (EDT) In-Reply-To: <874nqfl1r2.fsf@gmx.li> (Lawrence Mitchell's message of "Wed, 13 Jun 2012 15:34:09 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4254=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4254> : streams <769858> : uri <1142754> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61073 Archived-At: >> 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