From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "FRC" Newsgroups: gmane.emacs.help Subject: tempo in JDE: completion with Date: Fri, 12 Sep 2003 02:41:44 +0200 Organization: Wanadoo, l'internet avec France Telecom Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1063327615 20471 80.91.224.253 (12 Sep 2003 00:46:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Sep 2003 00:46:55 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 12 02:46:54 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 19xc5N-0000bo-00 for ; Fri, 12 Sep 2003 02:46:54 +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 19xc4M-0000pZ-Cg for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Sep 2003 20:45:50 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!freenix!wanadoo.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: amontsouris-108-1-18-107.w80-15.abo.wanadoo.fr Original-X-Trace: news-reader4.wanadoo.fr 1063327307 24797 80.15.147.107 (12 Sep 2003 00:41:47 GMT) Original-X-Complaints-To: abuse@wanadoo.fr Original-NNTP-Posting-Date: 12 Sep 2003 00:41:47 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Original-Xref: shelby.stanford.edu gnu.emacs.help:116551 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:12472 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12472 Hi, I use NTEmacs and JDE mode w/ ECB to write Java code and I like them much, although it did take some time to configure everything to my taste. One (minor) thing I'd like to change is the way the 'for', 'if' etc... abbrevs expansion deal with the last inserted char (the one that triggered the expansion). My understanding is that JDE tempo template functions are put in the function cell of the entries in the abbrev table - these functions are called when the abbrev is expanded. As far as I'm concerned, I always expand the abbrevs by hitting just after the abbrev. This is usually fine, except for these tempo-based expansions, which more often than not define some tempo-mark in the middle of the expansion (eg. to define the loop variables in the 'for' statement etc...). In these cases, the char is inserted after the expansion, right where the expansion left the point; but I always delete that space, b/c I don't want it and if I did I would put it in the tempo template in the 1st place. For example, the 'if' expansion sets the point just after the opening paranthesis, but then the self-inserts itself there, although I'll never want a space here. I appreciate that this insertion is perfectly consistent, but how can I get rid of it *only* for the tempo-based expansions (I don't want to discard the space when I expand 'public' or 'interface' for instance) ? I tried to bind some tempo-space function of my own to , but this func doesn't know if I want to keep the space or not (ie. if the abbrev has been expanded with tempo). I could use brute-force and list all the tempo-based abbrevs and checks if current abbrev matches one of them, but there must be a better way. My guess is that I need a mean to cancel the char insertion from within the tempo template, but I didn't manage to do so (looked at discard-input and another unread-xxx function). How can I sort this out (apart from hitting C-x ' instead of ) ? FRC