
-----------------------------------
MrUmunhum
Sun Apr 27, 2008 4:28 pm

Xemacs, lisp help
-----------------------------------
Hi group, 
  I need some help with my init.el. I am trying to call a mod for Rexx when I load a rexx file. 
I don't want to use the file type option (prog.rex). I want to define a rexx file as: 
First line of file will start with "/* ". 
File name does not end with .c, .cpp, .h or .hpp 
 I have tried these test without success:  (if (looking-at "\/\* ") 'display-warning :warning "Rexx") 
 (if (looking-at "\Does anyone have any URLs that could help me with my problem? :vi:

I forgot, I am using FC8.

-----------------------------------
btiffin
Sun Apr 27, 2008 10:16 pm

Re: Xemacs, lisp help
-----------------------------------
I'm not a regex guru, but try

$str = "/* ";
if ($str =~ m%[/][*][ ]%) {print "$str is comment";} would work, but$str = "/* ";
if ($str =~ m/[\/][*][ ]/) {print "$str is comment";} would be required if you were using the usual slash delim.

There are other re expressions that would work, but I like simple, quick grok, than brain backtracking over escapes when possible.

Cheers
