From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= Newsgroups: gmane.emacs.help Subject: Re: Defining functions on the fly Date: Mon, 15 Jun 2015 12:33:04 +0200 Message-ID: <557EA9E0.7020904@easy-emacs.de> References: <557E99BE.2060407@easy-emacs.de> <878ubls34d.fsf@gnu.org> 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 1434364410 19533 80.91.229.3 (15 Jun 2015 10:33:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Jun 2015 10:33:30 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 15 12:33:22 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 1Z4Rhg-0005id-P8 for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 12:33:21 +0200 Original-Received: from localhost ([::1]:33310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Rhg-0005BV-0n for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2015 06:33:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4RhV-0005B6-Qq for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 06:33:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4RhS-0004E3-Jk for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 06:33:09 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.187]:55528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4RhS-0004Dz-9i for help-gnu-emacs@gnu.org; Mon, 15 Jun 2015 06:33:06 -0400 Original-Received: from [192.168.178.31] ([77.3.44.153]) by mrelayeu.kundenserver.de (mreue004) with ESMTPSA (Nemesis) id 0MNPzx-1Yy82y0iUb-006uu1 for ; Mon, 15 Jun 2015 12:33:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: <878ubls34d.fsf@gnu.org> X-Provags-ID: V03:K0:cifiplcv9wOr4xrvD1J8Rhdb1gHCEnQMJHkGuw42ukmNMWmPXGc wp3VhXdoa8iOwzvJsrDPN3+zm+1MDtzbU/0buosgWip+zojOoLfaN4phALwTEQ1zdlDcgrs l6Qspw6Zla310Jki/5BorPSLuKCpaWLCZ08M74WoWlVPcU+3VeQM2DiLUEqa6t1BlwRLLO9 CcOXpFXUC+upyhhTJm8aw== X-UI-Out-Filterresults: notjunk:1;V01:K0:LJC+XZkpxdk=:BxEWpvEWcrSNRyDXN0e5U7 1E+h58+BJk/lM+TrJpH+IhnsbBS/1I29s91dFr8GPGSGuLHKcNgERZ6Sy+tKyAgVWnn3Z8caI /XQPF4tx3g2CzrVI0GYl0Gt9+MgAsqn+ajL10OuzqNo0VTp9gEBCy/ScFf/91lqwVUci1M7RW eoQevK22yg8y9aa49z2f96Ccf6EMukGdbyv1ZY8y7qLT+f6DXG86rwZfPRWE+cIOllyDzVZRe qcTwdd2JxCWGv9/1himbS5H0MR8YTiFRJiXZnkCsgCMpcbWQS3IjMeVYvyGs1HjqiTIvD0MC6 G+3jLmWJSdPlHtjphGl4pzFq4bw1piPYhLgD55ZeqAbVffXJyl1jRMofx4ElR9i7BCfX5sbdb jxXoJXlpbIdIPgBPEou7bvH3JrTsL3+1d7TZ7ETl7ddmp0CsmS3jMu36iyY9pCw2IIG7ofBvE u8RyMnLPaGnK7YkB2XtdpenlZ+MugDy3XoY6oxQAVi9EWmbiutfNUW3ihasm0pDXru7baGhcH odF8KQXW3hqVKt2bjJSQQumQNk2wMMNvYKshYmE/NmeRdjWsa1StFtuBGuOiktOZO0EWWTWd+ Yc076Af+cCnG752+gI41kbnVBQ4kg7I+dQKL8VwFteWLcK+NLAww+1tMcK5kc0kYcMjDxGuwA d5ykC/iKHTp56Vmz9AB/j7McYwuOZ6+L0qyEHAN1AOwWpQA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.126.187 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:104938 Archived-At: Am 15.06.2015 um 12:00 schrieb Tassilo Horn: > Andreas Röhler writes: > > Hi Andreas, > >> have a bunch of subroutines which are useful in several modes - >> beginning/end of expressions, string positions, comments etc. >> >> Now every mode should get its own prefix. > I don't quite get what you are trying to achieve. If your > beginning-of-expression function is useful in a-mode, b-mode, and > c-mode, what's the purpose of defining it three times? AFAIU tab-completion of mode's symbols requires it equally prefixed. > If you really want to have separate {a,b,c}-beginning-of-expression > functions, then you could do it by defining aliases. > > (dolist (prefix (list "a" "b" "c")) > (defalias (intern (concat prefix "-beginning-of-expression")) > #'beginning-of-expression)) > > That works, thanks!