From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Defining functions on the fly Date: Mon, 15 Jun 2015 13:24:29 +0200 Message-ID: <87vbepqknm.fsf@gnu.org> References: <557E99BE.2060407@easy-emacs.de> <877fr58fr0.fsf@gmail.com> <557EA6D3.40108@easy-emacs.de> <87zj41qml7.fsf@gnu.org> <87egldcj7t.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1434367500 5320 80.91.229.3 (15 Jun 2015 11:25:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Jun 2015 11:25:00 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 15 13:24:49 2015 Return-path: Envelope-to: geh-help-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 1Z4SVU-0000sr-C7 for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 13:24:48 +0200 Original-Received: from localhost ([::1]:33475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4SVT-0007Dk-Gs for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 07:24:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4SVH-0007Df-N1 for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 07:24:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4SVE-0001Dc-C3 for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 07:24:35 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:36951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4SVE-0001CR-63 for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 07:24:32 -0400 Original-Received: from thinkpad-t440p (dhcp148.uni-koblenz.de [141.26.71.148]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id D69681A8341; Mon, 15 Jun 2015 13:24:29 +0200 (CEST) Mail-Followup-To: Michael Heerdegen , help-gnu-emacs@gnu.org In-Reply-To: <87egldcj7t.fsf@web.de> (Michael Heerdegen's message of "Mon, 15 Jun 2015 13:19:18 +0200") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 141.26.64.15 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104945 Archived-At: Michael Heerdegen writes: >> > Debugger entered--Lisp error: (wrong-type-argument symbolp (intern >> > (concat pfxd >> > "-foo"))) >> > defalias((intern (concat pfxd "-foo")) (lambda nil nil)) >> >> This might depend on emacs version. At least with the current git >> version, `defalias' evaluates its first argument: >> >> (defalias (intern "foo-bar") #'forward-sexp) ;; Works fine > > In the example above, in the expansion of the `defun' call the first > argument to defalias is the (unevaluated!) list: > > (intern (concat pfxd "-foo")) > > The corresponding call to defalias will also fail on trunk. Ah, yes, so that's basically as if (defalias '(intern (concat pfxd "-foo")) ...) had been written. Bye, Tassilo