From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: C K Kashyap Newsgroups: gmane.emacs.help Subject: emacs lisp - unable to write a function maker Date: Fri, 16 Sep 2011 14:16:04 +0530 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=90e6ba6e8e5808d21804ad0b062c X-Trace: dough.gmane.org 1316162783 3180 80.91.229.12 (16 Sep 2011 08:46:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Sep 2011 08:46:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 16 10:46:20 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R4U3s-0006W1-O2 for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Sep 2011 10:46:16 +0200 Original-Received: from localhost ([::1]:57958 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4U3m-0001K7-UP for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Sep 2011 04:46:10 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4U3i-0001Jn-3E for help-gnu-emacs@gnu.org; Fri, 16 Sep 2011 04:46:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4U3h-0000Mi-58 for help-gnu-emacs@gnu.org; Fri, 16 Sep 2011 04:46:06 -0400 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:56634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4U3g-0000Md-UW for help-gnu-emacs@gnu.org; Fri, 16 Sep 2011 04:46:05 -0400 Original-Received: by iaen33 with SMTP id n33so2953198iae.0 for ; Fri, 16 Sep 2011 01:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=3l58ilPGDpA+7ZzacBFZfHASPc+7wur5zTlasJQQEMA=; b=EQbCbYVcCMTF32xaF1G7bQZopuO3QpIkhGvrRDjTnN3WfilsLMRx/Ph3ZKLkZjYVuC jrSeRKvBmvUqCekrKC79fxQYxgJS9IoRlW5d+JZ0iLdC+7FkcrrpYsO/c2sgQEPDFbsH lz1eRHBuQXxk+PYiDXbIIZvV//046/p+3yYV8= Original-Received: by 10.42.161.3 with SMTP id r3mr1642333icx.186.1316162764329; Fri, 16 Sep 2011 01:46:04 -0700 (PDT) Original-Received: by 10.42.176.72 with HTTP; Fri, 16 Sep 2011 01:46:04 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 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:82244 Archived-At: --90e6ba6e8e5808d21804ad0b062c Content-Type: text/plain; charset=ISO-8859-1 Hi, I was trying to write a function that would help in creating various abbreviation functions. (defun makeAbrevFun (name val) (eval (defun name () (insert val)))) The intention is that the below code would create a function called "aa" (makeAbrevFun 'aa "aaaaaaaaaaaaaa") That can be invoked by doing (aa)C-X C-e This does not work. Could someone please let me know how I can achieve this? Regards, Kashyap --90e6ba6e8e5808d21804ad0b062c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,
I was trying to write a function that would help in creating variou= s abbreviation functions.


(def= un makeAbrevFun (name val)=A0
=A0 (eval=A0
=A0 =A0(defu= n name () (insert val))))

The intention is that the below code would create a fun= ction called "aa"=A0
(makeAbrevFun 'aa "aaaaaa= aaaaaaaa")
That can be invoked by doing (aa)C-X C-e
This does not work. Could someone please let me know how I can achieve= this?
Regards,
Kashyap

--90e6ba6e8e5808d21804ad0b062c--