[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Querying Complete Scoped Identifier Name at Point
From: |
Drew Adams |
Subject: |
RE: Querying Complete Scoped Identifier Name at Point |
Date: |
Wed, 3 Feb 2010 09:06:34 -0800 |
> Has anybody written any extension of symbol-at-point that also
> includes in context, which for example in C++ means to prefix it with
> its namespace if given.
>
> For example standing somewhere at "vector" in the expression
> "std::vector" should return "std::vector" instead of "vector".
>
> This is of course trivial to write. I just wondered if anybody has
> written a multi-language interface for this?
>
> Any suggestions on what to call such a function? My suggestion is
> scoped-identifier-at-point()
>
> Maybe we should include it thingatpt+.el, Drew?
I'm no expert on this, but I would think that `:' should simply be declared a
symbol constituent for the language in question, if the fully qualified symbol
name includes the `std::'. Dunno.
If not, that might still be the way to go, but locally only, i.e. for the
purposes of grabbing the symbol.
The functions in `thingatpt+.el' let you specify a syntax-table arg, so you
might be able to get what you want by passing a syntax-table arg that recognizes
`:' as a symbol constituent.