From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Skilbeck Newsgroups: gmane.emacs.help Subject: Re: Need help with creating shortcuts Date: Sun, 24 Jun 2012 23:14:19 +0100 Message-ID: <20120624221419.GA3234@mark-laptop> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1340576077 28897 80.91.229.3 (24 Jun 2012 22:14:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 24 Jun 2012 22:14:37 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: C K Kashyap Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 25 00:14:36 2012 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 1Siv4g-0006TE-OF for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Jun 2012 00:14:30 +0200 Original-Received: from localhost ([::1]:45040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Siv4g-0003Bq-GY for geh-help-gnu-emacs@m.gmane.org; Sun, 24 Jun 2012 18:14:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Siv4b-0003Bd-Jv for help-gnu-emacs@gnu.org; Sun, 24 Jun 2012 18:14:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Siv4Z-0006L3-TB for help-gnu-emacs@gnu.org; Sun, 24 Jun 2012 18:14:25 -0400 Original-Received: from li357-97.members.linode.com ([178.79.188.97]:50876 helo=mail.iammark.us) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Siv4Z-0006Kq-NH for help-gnu-emacs@gnu.org; Sun, 24 Jun 2012 18:14:23 -0400 Original-Received: from mail.iammark.us (host81-152-165-78.range81-152.btcentralplus.com [81.152.165.78]) by mail.iammark.us (Postfix) with ESMTPSA id C113CABBB; Sun, 24 Jun 2012 23:14:20 +0100 (BST) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 178.79.188.97 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:85439 Archived-At: Adding to the previous answer, you might then be interested in the YASnippet extension[1]. [1] https://github.com/capitaomorte/yasnippet#readme On Sun, Jun 24, 2012 at 01:27:28PM +0530, C K Kashyap wrote: > Hi All, > I've been defining functions to create shortcuts > > (defun (hw) (progn > (delete-fun) ; This is another function that deletes the actual > function name from the buffer > (insert "Hello World")) > > I invoke it as follows - (hw)C-X-e, this removes (hw) and replaces it with > Hello World. > > the problem is that I have to type parenthesis. I explored abbreviations > but they cannot seem to be parameterized. Can someone please suggest an > alternative? > > Regards, > Kashyap -- - mgs. if all you young men / were fish in the water how many young girls / would undress and dive after