Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What is the last letter in the word "SlickEdit":
How many LETTERS are in the following? "a1b2c3":
Which number is missing?  "12345689":

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: RaffoPazzo
« on: April 29, 2019, 02:38:37 PM »

Sorry it worked now. I must have got lost track of what I did try and how.
Posted by: RaffoPazzo
« on: April 29, 2019, 02:34:11 PM »

Instead of guessing what the langid is, the attached macro will display the langid. Load it and run the command "display_langid". It will display the langid in the message line.

Thanks. This printed idris and I did try to rename my function to idris_proc_search. What could be a reason for it not being run automatically when I open an idris file?
Posted by: Clark
« on: April 29, 2019, 02:01:29 PM »

Instead of guessing what the langid is, the attached macro will display the langid. Load it and run the command "display_langid". It will display the langid in the message line.
Posted by: RaffoPazzo
« on: April 29, 2019, 11:42:23 AM »

I am trying to add basic support for Idris tags. I created a new language with mode name Idris (capital I) and extension idr. In my idris.e I have the following (I use message() to debug it):

Code: [Select]
int idr_proc_search(_str &proc_name, bool find_first)
{
  int status=0;
  if (find_first) {
    if (proc_name:=='')
      proc_name = _clex_identifier_re();
    status = search('^\c{'proc_name'}[ \t]*\:', '@rhi');
  } else
    status = repeat_search();
  if (status)
    return status;
  tag_init_tag_browse_info(auto cm, get_match_text(0), "", SE_TAG_TYPE_PROTO);
  proc_name = tag_compose_tag_browse_info(cm);
  message(proc_name);
  return 0;
}

When I run this function manually (called from a command) it produces what I believe is the right string but my Def view is always empty and nothing is displayed in the message bar, suggesting that it is not run automatically when I open an .idr file.

Even if I rename the function to Idris_proc_search or idris_proc_search it still does not work as I expect.

Am I misunderstanding how this thing is supposed to work?