function add_to_hook

Synopsis

Add a function to a hook

Usage

add_to_hook (String_Type hook_name, Ref_Type funct)

Description

add_to_hook adds the function funct to the beginnning of the list of hooks associated with hook_name . The currently supported hooks include:
    _jed_append_region_hooks
    _jed_exit_hooks
    _jed_find_file_after_hooks
    _jed_find_file_before_hooks
    _jed_init_display_hooks
    _jed_insert_file_hooks
    _jed_quit_hooks
    _jed_read_file_hooks
    _jed_reset_display_hooks
    _jed_resume_hooks
    _jed_save_buffer_after_hooks
    _jed_save_buffer_before_hooks
    _jed_set_mode_hooks
    _jed_switch_active_buffer_hooks
    _jed_suspend_hooks
    _jed_write_region_hooks
See the file hooks.txt in the main Jed distribution for more information.

See also

append_to_hook , remove_from_hook

function append_to_hook

Synopsis

Append a function to a hook

Usage

append_to_hook (String_Type hook_name, Ref_Type funct)

Description

append_to_hook adds the function funct to the end of the list of hooks associated with hook_name . See add_to_hook for more information.

See also

add_to_hook , remove_from_hook

function remove_from_hook

Synopsis

Remove a function from a list of hooks

Usage

remove_from_hook (String_Type hook_name, Ref_Type funct)

Description

remove_from_hook removes the function funct from the list of hooks associated with hook_name .

See also

add_to_hook , append_to_hook

function set_buffer_hook

Synopsis

set_buffer_hook

Usage

set_buffer_hook (String_Type hook, String_Type f)

Description

Set current buffer hook hook to function f . f is a user defined S-Lang function. Currently, hook can be any one of:
         "par_sep"  -- returns zero if the current line does not
              constitute the beginning or end of a paragraph.
              It returns non-zero otherwise.  The default value of hook is
              is_paragraph_separator.
         "indent_hook" -- returns nothing.  It is called by the indent line
              routines.
         "wrap_hook"   hook that is called after a line is wrapped.  Returns
              nothing.
         "newline_indent_hook"  --- returns nothing.  If this hook is defined,
              it will be called instead of the internal function
              newline_and_indent is called.
         "bob_eob_error_hook"  --- returns nothing.  If this hook is defined,
              it will be called whenever an error one of the internal cursor
              movement functions would have generated an end of buffer or beginning of
              buffer error.  It is passed an integer that indicates which function
              would have generated the error.  Specifically:

                       -1  previous_line_cmd
                       -2  previous_char_cmd
                       -3  page_up
                        1  next_line_cmd
                        2  next_char_cmd
                        3  page_down
         "mouse_down", "mouse_up", "mouse_drag" "mouse_2click" "mouse_3click"
              These hooks are used to override default hooks defined by the
              mouse_set_default_hook function.

See also

unset_buffer_hook , mouse_set_default_hook

function unset_buffer_hook

Synopsis

Remove a buffer hook

Usage

unset_buffer_hook (String_Type name)

Description

The unset_buffer_hook function removes a specified buffer hook from the current buffer. If name is the empty string, then all the buffer hooks of the current buffer will be unset.

See also

set_buffer_hook