jed-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Problem with path_basename()


Somewhere (I think it was here on the list) I found the following code
to load make_mode:

   static define turn_on_make_mode() {
      variable name = buffer_filename();
      if (strcmp(path_basename(name), "Makefile") == 0) {
         make_mode();
      }
   }

The problem is: it doesn't recognize names like Makefile.foo.  As far
as I understand the documentation, path_basename() is the part of the
filename without the extension and without the dot.

So, path_basename("Makefile") and path_basename("Makefile.foo") should
give the same results.  Actually the extension is not stripped, does
someone know why?

Thx, Martin

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]