Seems like we can forget what I said about the Scheme template in my last post.

Methods probably showed in ECB due to some old caching.

When I opened new files no methods showed until switched back to the elisp version/template.

What I really would like is simply for all words that match "foo" in "(de foo " to show up in the method window. What is the easiest way to accomplish this?

 

On Fri, Jun 24, 2011 at 12:27 PM, Henrik Sarvell <hsarvell@gmail.com> wrote:
You ar correct Eric, sorry for the confusion, I had added your hook statement to my config but forgetting to delete the PicoLisp parser, after doing that it stopped working as you suspected.

You posted a fix earlier that I used to replace the corresponding old code in my PicoLisp copy of semantic-scm.el, and it worked!

I am now at the same place I was when using elisp as a template but with Scheme instead, the definitions are showing up properly except for functions containing semi-colons.

Problem is of course that Scheme also uses ; for commenting (I suppose?) and I can't see anywhere in the Scheme files (scheme.by / semantic-scm.el) that this character is defined as being used for comments, so no easy fix, but now maybe it is possible to fix at least?

I've also checked for instance make.by and semantic-make.el but couldn't see any comment handling there either.

From this I suppose you could infer that semantic somehow picks up stuff from the coding mode, in this case picolisp-mode which definitely handles # as comments with proper colors and all, however this is not happening in the PicoLisp case.




On Thu, Jun 23, 2011 at 5:12 AM, Eric M. Ludlam <ericludlam@gmail.com> wrote:
Hi,


On 06/20/2011 02:54 AM, Henrik Sarvell wrote:
Hi again, forget the earlier question, it just works which is great.

This now surprises me, since your last email about functions being created with 'de' instead of 'defun'.


Just one snag, PicoLisp uses # for commenting, not ;.

In fact PicoLisp uses ; as a getter function to get values of object
attributes.

The problem is that as soon as a function contains ; it will disappear
from the ECB list.

I.e the following works and shows upp:

(de Test1 (Obj)
  (print Obj))

But not this:

(de Test2 (Obj)
  (print (; Obj name)))

Commented lines are handled properly by picolisp-mode but in this case
the semantic parser won't pick that up.

Any ideas how I can remedy this?

This is because the elisp parser uses Emacs' 'read' function, which has ; built-in as a comment character.  I'd assume that it is not possible to fix that state.

That, combined with me not yet understanding why the elisp parser works makes me think your best bet is to start with the Scheme parser.  That parser is quite simple (scheme.by) and could be updated for picolisp definition symbols.  semantic-scm.el has customizations which will then fix the comment syntax by obeying the syntax table for picolisp.

Eric