From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexis Newsgroups: gmane.emacs.help Subject: Re: Defining functions on the fly Date: Mon, 15 Jun 2015 20:37:03 +1000 Message-ID: <87616p8dgw.fsf@gmail.com> References: <557E99BE.2060407@easy-emacs.de> <877fr58fr0.fsf@gmail.com> <557EA6D3.40108@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1434364647 23188 80.91.229.3 (15 Jun 2015 10:37:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Jun 2015 10:37:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 15 12:37:27 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 1Z4Rle-0007Jc-5c for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 12:37:26 +0200 Original-Received: from localhost ([::1]:33321 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Rld-00061x-9F for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 06:37:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4RlR-00061r-8j for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 06:37:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4RlN-0006BG-U2 for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 06:37:13 -0400 Original-Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]:35972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4RlN-0006Ax-NI for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 06:37:09 -0400 Original-Received: by pabqy3 with SMTP id qy3so63074964pab.3 for ; Mon, 15 Jun 2015 03:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:to:subject:in-reply-to:date:message-id:mime-version :content-type:content-transfer-encoding; bh=owWQzb/PTfqRwJO1HrJXfp55e8CIv0GngqCmp8Pa60Y=; b=1JAllvrdk2gjCJJ+3BhQaG91PA2eXYXQ2OMkPBesgWreV+v2k7q+CJKcHMgMKGzXUc gYY+appH9bPDCGVAy8YlZg2w4feDJa+MmQPVfT6Dy49BfbeP0pP5DZIshU5Xda1fQXBa 9xPnC0t58G5kW3N/ucNZilEyxt6sQJYw+j/n7CcMdiLmasdj/Y9wwmGVkXS+O0wSgBgQ LkIXZDddMFxO2ar57Eczz7v9q/cbp/n9WCY9bPDj0xdvD/XOXh+wHN/mcoNAj3o6pTpF vvjBzgAU+9EUGLOFomFS4Nyp0iD9Yql9/u2XtVw46PHSXMxKIjUgW2xPpw4nsTYh72Yi N92w== X-Received: by 10.66.174.68 with SMTP id bq4mr47228546pac.90.1434364629039; Mon, 15 Jun 2015 03:37:09 -0700 (PDT) Original-Received: from localhost (ppp118-209-134-23.lns20.mel8.internode.on.net. [118.209.134.23]) by mx.google.com with ESMTPSA id gi6sm11769954pbd.69.2015.06.15.03.37.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 03:37:08 -0700 (PDT) In-reply-to: <557EA6D3.40108@easy-emacs.de> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22f 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:104939 Archived-At: Andreas Röhler writes: > Seems (intern... is not evaluated at this point: > > (defvar pfxd "pfxd-") > > (defun (intern (concat pfxd "-foo")) ()) You're right, sorry! When i use `intern' like this, it's in the context of quasiquoting, e.g.: (eval `(defun ,(intern (concat "ewmctrl-select-window-" chosen-char "-for-action")) () ,(concat "Select window '" chosen-char "' for an action.") (interactive) (ewmctrl--dispatch-action ,chosen-char))) Alexis.