From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: SameerDS Newsgroups: gmane.emacs.help Subject: Re: inserting code based on syntactic information in cc-mode Date: Mon, 23 Nov 2009 01:58:10 -0800 (PST) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1259102155 25592 80.91.229.12 (24 Nov 2009 22:35:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Nov 2009 22:35:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 24 23:35:48 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ND3z7-0001mT-QC for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Nov 2009 23:35:46 +0100 Original-Received: from localhost ([127.0.0.1]:42759 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ND3z7-0007yG-Hm for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Nov 2009 17:35:45 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!g22g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 18 Original-NNTP-Posting-Host: 59.162.23.19 Original-X-Trace: posting.google.com 1258970291 9442 127.0.0.1 (23 Nov 2009 09:58:11 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 23 Nov 2009 09:58:11 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: g22g2000prf.googlegroups.com; posting-host=59.162.23.19; posting-account=9lo_eQoAAACfsIyHE_E4yJ4DVkC1bdwh User-Agent: G2/1.0 X-HTTP-Via: 1.1 netmon.iitb.ac.in (squid/3.0.STABLE20) X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.04 (jaunty) Shiretoko/3.5.5, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:174968 X-Mailman-Approved-At: Tue, 24 Nov 2009 17:34:16 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70099 Archived-At: On Nov 23, 2:44=A0pm, Joost Kremers wrote: > SameerDS wrote: > > I want to write elisp functions that can insert code based on the > > syntactic information at the point where they are invoked. > > this is not entirely what you describe, but it may be more useful even: > > http://code.google.com/p/yasnippet/ Indeed, that seems like something I definitely want to use ... thanks for the pointer! But it is only half the solution. Rather than remembering abbrevs for code snippets or even binding them to keys, I would like to write glue logic that selects the correct snippet based on what I am typing! Hence the need to inspect local syntactic information ... -- Sameer. http://sameer.sbuddhe.net/