From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: junktotrash@hotmail.com (FRC) Newsgroups: gmane.emacs.help Subject: Re: tempo in JDE: completion with Date: 18 Sep 2003 02:47:18 -0700 Organization: http://groups.google.com/ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1063879329 20602 80.91.224.253 (18 Sep 2003 10:02:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 18 Sep 2003 10:02:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 18 12:02:07 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19zvbz-0004vY-00 for ; Thu, 18 Sep 2003 12:02:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19zvbl-0003fQ-8L for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Sep 2003 06:01:53 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Host: 159.50.203.7 Original-X-Trace: posting.google.com 1063878439 13750 127.0.0.1 (18 Sep 2003 09:47:19 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 18 Sep 2003 09:47:19 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:116692 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:12614 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12614 sandipchitale@yahoo.com (Sandip Chitale) wrote in message news:... > Can you share the code with us? > > thanks, > sandip > > "FRC" wrote in message news:... > > I found out that a 'no-self-insert property can be put in the plist of the > > symbol present in the function cell of the entry in the abbrev > > table/obarray. If the function returns non-nil, the char is discarded - > > which is exactly what I was looking for. > > > > FRC It goes like this in the jde-mode-hook of my .emacs: (mapatoms (lambda (symb) (and (symbolp (symbol-function symb)) (string-match "tempo-template-jde-gen" (symbol-name (symbol-function symb))) (put (symbol-function symb) 'no-self-insert t))) local-abbrev-table) I'm still an Emacs-Lisp rookie, so there might be a better way to get the same result. Note that it somewhat messed with completions within comments, as in these cases I do want the space insertion but the expansion (even if void) eats it unconditionally. This is a minor pb AFAIC and quoting with C-q does the job. HTH, FRC