jed-users mailing list

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

set_mode() problem


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");
   }
}

The reason for the error("Yes") is to verify to myself that that IF
statement actually happens and it does. But it's not set to javascript
mode (traceback follows)! I also tried set_mode("javascript", 4)

Once opened I can just: M-x javascript_mode
and that works fine.



Traceback: error
/home/peterbe/.jedrc:117:html_mode_hook:Run-Time Error
/usr/share/jed/lib/site.slc:-1:call_function:Run-Time Error
  Local variables for call_function:
        Array_Type call_function = Struct_Type[0]
        Ref_Type call_function = &html_mode_hook
/usr/share/jed/lib/site.slc:1067:runhooks:Run-Time Error
  Local variables for runhooks:
        Array_Type runhooks = Struct_Type[1]
/usr/share/jed/lib/site.slc:1078:run_mode_hooks:Run-Time Error
  Local variables for run_mode_hooks:
        String_Type run_mode_hooks = "html_mode_hook"
/usr/share/jed/lib/html.slc:579:html_mode:Run-Time Error
  Local variables for html_mode:
        String_Type html_mode = "html"
***string***:1:<top-level>:Run-Time Error
Traceback: called from eval: html_mode
Traceback: eval
/usr/share/jed/lib/site.slc:1878:mode_hook:Run-Time Error
  Local variables for mode_hook:
        String_Type mode_hook = "dtml"
        Integer_Type mode_hook = 5
        String_Type mode_hook = "html_mode"
Traceback: find_file
/usr/share/jed/lib/site.slc:3189:command_line_hook:Run-Time Error
  Local variables for command_line_hook:
        Integer_Type command_line_hook = 0
        Integer_Type command_line_hook = 2
        String_Type command_line_hook = "followup.js.dtml"
        Integer_Type command_line_hook = 0
        Undefined_Type command_line_hook = Undefined_Type
        String_Type command_line_hook = "llowup.js.dtml"
        String_Type command_line_hook = "/home/peterbe/.jedrc"
        Undefined_Type command_line_hook = Undefined_Type
***string***:-1:<top-level>:Run-Time Error
Traceback: called from eval: .()command_line_hook
Traceback: read_with_completion
/usr/share/jed/lib/site.slc:1604:emacs_escape_x:User Break
  Local variables for emacs_escape_x:
        String_Type emacs_escape_x = ""
        Integer_Type emacs_escape_x = 1
        String_Type emacs_escape_x = "M-x"
        Integer_Type emacs_escape_x = -1
        Undefined_Type emacs_escape_x = Undefined_Type


-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com

--------------------------
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]