- Subject: [jed-users] text_mode_hook -> Stack Underflow Error
- From: Harry Monroe <harrymonroe2012@xxxxxxxxx>
- Date: Sat, 29 Apr 2017 17:32:13 +0200
Hi,
i want to use this FAQ tip: http://www.jedsoft.org/jed/faq.html#faq-2
It didn't work with the system's default jed (Debian/Jessie)
so i successfully compiled a fresh version of jed using --prefix=/opt/jed
$ /opt/jed/bin/jed --version
jed version: pre0.99.20-128/Unix
Compiled with GNU C 4.9
S-Lang version: 2.3.0
jed compile-time options:
+LINE_ATTRIBUTES +BUFFER_LOCAL_VARS +SAVE_NARROW +TTY_MENUS
+EMACS_LOCKING +MULTICLICK +SUBPROCESSES +DFA_SYNTAX +ABBREVS
+COLOR_COLUMNS +LINE_MARKS +GPM_MOUSE +IMPORT
Using JED_ROOT=/opt/jed/jed
$ cat .jedrc
define text_mode_hook (mode)
{
local_setkey ("indent_line", "\t");
}
$ /opt/jed/bin/jed -batch test.txt
Stack Underflow Error
/home/harry/.jedrc:1:text_mode_hook:Stack Underflow Error
Local variables for text_mode_hook:
Undefined_Type mode = Undefined_Type
/opt/jed/jed/lib/site.sl:1142:call_function:Stack Underflow Error
Local variables for call_function:
Array_Type args = Struct_Type[0]
Ref_Type func = &text_mode_hook
/opt/jed/jed/lib/site.sl:1153:runhooks:Stack Underflow Error
Local variables for runhooks:
Array_Type args = Struct_Type[1]
/opt/jed/jed/lib/site.sl:1175:run_mode_hooks:Stack Underflow Error
Local variables for run_mode_hooks:
String_Type hook = "text_mode_hook"
/opt/jed/jed/lib/textmode.sl:90:text_mode:Stack Underflow Error
Local variables for text_mode:
String_Type mode = "Text"
***string***:1:<top-level>:Stack Underflow Error
Traceback: called from eval: text_mode
Traceback: eval
/opt/jed/jed/lib/site.sl:1964:mode_hook:Stack Underflow Error
Local variables for mode_hook:
String_Type ext = "txt"
Integer_Type n = 6
String_Type mode = "text_mode"
String_Type base = "test.txt"
Undefined_Type func = Undefined_Type
Error encountered while executing mode_hook
Traceback: find_file
/opt/jed/jed/lib/site.sl:3264:command_line_hook:Stack Underflow Error
Local variables for command_line_hook:
Integer_Type n = 0
Integer_Type i = 3
String_Type file = "test.txt"
Integer_Type depth = 0
Undefined_Type next_file = Undefined_Type
String_Type tmp = "st.txt"
String_Type init_file = "/home/harry/.jedrc"
Undefined_Type next_file_arg = Undefined_Type
Undefined_Type hookfun = Undefined_Type
Error encountered while executing command_line_hook
loading /opt/jed/jed/lib/site.sl
loading /opt/jed/jed/lib/os.sl
loading /opt/jed/jed/lib/menus.sl
loading /home/harry/.jedrc
Reading test.txt
loading /opt/jed/jed/lib/textmode.sl
loading /opt/jed/jed/lib/modeinfo.sl
I guess the FAQ is just working for an older version of jed?
How would i do the same thing in current version?
[2017 date index]
[2017 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]