From: Mike Mattie <codermattie@gmail.com>
To: emacs users <help-gnu-emacs@gnu.org>
Subject: language independant way to locate beginning of enclosing scope ?
Date: Thu, 13 Dec 2007 10:45:09 -0800 [thread overview]
Message-ID: <20071213104509.139daf02@reforged> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 752 bytes --]
Hello,
I am looking for a language independent way to locate the beginning of the enclosing scope.
Something along the lines of beginning-of-defun, in that the mode provides a language
specific version.
My goal is to be able to set up hippie-expand tables that are scoped. A bit more context
may help understand my goal.
I have templates that grind out code for imperative languages, the classic example being
the for loop. I can generate code fragments along with the loop body fairly easily.
for ( i , i < array, i++ ) {
// elem=array[i]
}
assuming that the cursor is within the loop body it would be nice to expand "elem"
and have it plug in the indexing fragment.
Any suggestions appreciated.
Thanks,
Mike Mattie
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
reply other threads:[~2007-12-13 18:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071213104509.139daf02@reforged \
--to=codermattie@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.