help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tempo in JDE: completion with <spc>


From: FRC
Subject: Re: tempo in JDE: completion with <spc>
Date: 18 Sep 2003 02:47:18 -0700

sandipchitale@yahoo.com (Sandip Chitale) wrote in message 
news:<b607d812.0309162129.4d019ab1@posting.google.com>...
> Can you share the code with us?
> 
> thanks,
> sandip
> 
> "FRC" <frc--NoSpAm--@myrealbox.com> wrote in message 
> news:<bk7pi5$e3f$1@news-reader1.wanadoo.fr>...
> > 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]