- Subject: Re: set_mode() problem
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Wed, 20 Feb 2008 12:39:14 -0500
Peter Bengtsson <mail@xxxxxxxxxxx> wrote:
> My .jedrc contains the following:
>
> define html_mode_hook()
>{
> set_mode("html", 4);
> if (path_extname(buffer_filename())==".cpt")
> set_mode("html", 4);
> if (path_extname(buffer_filename())==".pt")
> set_mode("html", 4);
> if (path_extname(buffer_filename())==".zpt")
> set_mode("html", 4);
> if (is_substr(buffer_filename(), ".js.dtml")) {
> set_mode("javascript_mode", 4);
> error("Yes");
> }
>}
[...]
> Once opened I can just: M-x javascript_mode
> and that works fine.
If you want javascript_mode, then you should call it directly.
That is, use:
if (is_substr(buffer_filename(), ".js.dtml"))
javascript_mode ();
The set_mode function may be used to set the mode flags and the name
as it appears on the command line.
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2008 date index]
[2008 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]