From: Eric Ludlam <eludlam@mathworks.com>
Subject: Re: hippie-expand customization challenge. Possible??!!
Date: Fri, 21 Oct 2005 11:41:08 -0400 [thread overview]
Message-ID: <kofyqux4h7.fsf@ludlamelinux.dhcp.mathworks.com> (raw)
In-Reply-To: 1129889394.623547.258430@g49g2000cwa.googlegroups.com
You might want to look at the CEDET / Semantic tools which already
does something similar to what you are looking to do.
http://cedet.sf.net/semantic.shtml
Eric
>>> "Sune" <sune_ahlgren@hotmail.com> seems to think that:
>Hi all!
>
>I want to use hippie-expand for C function completion. I've but
>together a script which parses my header files and lists them one by
>one like so:
>
>foo1( prm1, prm2);
>goo2( prm1, prm2);
>
>in a file I call emacs_auto_comp.
>
>First I have updated hippie expand to only expand like below:
>(setq hippie-expand-try-functions-list '(try-expand-line-all-buffers))
>(setq hippie-expand-only-buffers '("emacs_auto_comp"))
>
>This works good if I type
>f<expand-key> => foo1( prm1, prm2);
>from the beginning of a line.
>
>BUT if I want to expand from the middle of the row say I have already
>written:
>
>if( f
>
>and hit my <expand-key>
>
>I get 'No expansion found' from Emacs.
>
>I want it to work like this:
>- From current cursor position go backwards until you find either a
>beginning-of-line or a space ' ' character.
>- Use only what was found from the initial cursor position to whichever
>of the 2 cases stopped your back tracing when performing expansion.
>In the example above :
>'f' was found, then space broke the back tracing
>- Use the token found (in the example 'f') and expand as if 'f' was
>found in the beginning of the line.
>=> if( foo1( prm1, prm2);
>
>(I can live with the semicolon being added)
>
>I am not Elisp-clever enough to make this happen. Are you?
>
>Thanks a LOT
>/Sune
>
--
Eric Ludlam The MathWorks x 7556 eludlam@mathworks.com
http://www.siege-engine.com http://www.mathworks.com
next prev parent reply other threads:[~2005-10-21 15:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-21 10:09 hippie-expand customization challenge. Possible??!! Sune
2005-10-21 15:41 ` Eric Ludlam [this message]
2005-10-21 19:01 ` Sune
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=kofyqux4h7.fsf@ludlamelinux.dhcp.mathworks.com \
--to=eludlam@mathworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).