On Thu, Feb 23, 2012 at 11:51 PM, Philip Hudson <[email protected]>wrote:

> // FIXME This sets up unbounded recursion; need another way to store and
> // reference the original function
> // var old_external_editor_make_base_**filename =
> //    (old_external_editor_make_**base_filename ||
> //     external_editor_make_base_**filename);
> // function external_editor_make_base_**filename (elem, top_doc) {
> //    return "conkeror-edit-"+old_external_**editor_make_base_filename(**elem,
> top_doc);
> // }
>
>
Function names are bound when the code is parsed.  To rebind a function at
run time, assign an anonymous function to the name:

external_editor_make_base_filename = function (elem, top_doc) {
    return "conkeror-edit-" + old_external_editor_make_base_filename(elem,
top_doc);
};
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to