From ec1bedc25eb239a0352e097ddc2b9168eb0af0c2 Mon Sep 17 00:00:00 2001 From: "M. Levinson" Date: Sat, 6 Jan 2007 07:30:32 -0500 Subject: [PATCH] Python: Document more goto_url_hook and follow_url_hook return values. Document what happens if goto_url_hook or follow_url_hook returns None or "". doc/events.txt already explains the corresponding C values. [ commit message by me --KON ] --- contrib/python/hooks.py | 6 ++++-- doc/python.txt | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/contrib/python/hooks.py b/contrib/python/hooks.py index a4726e49..28cbf32b 100644 --- a/contrib/python/hooks.py +++ b/contrib/python/hooks.py @@ -49,7 +49,8 @@ dumbprefixes = { def goto_url_hook(url): """Rewrite a URL that was entered in a "Go to URL" dialog box. - This function should return a URL for ELinks to follow, or None if + This function should return a string containing a URL for ELinks to + follow, or an empty string if no URL should be followed, or None if ELinks should follow the original URL. Arguments: @@ -63,7 +64,8 @@ def goto_url_hook(url): def follow_url_hook(url): """Rewrite a URL for a link that's about to be followed. - This function should return a URL for ELinks to follow, or None if + This function should return a string containing a URL for ELinks to + follow, or an empty string if no URL should be followed, or None if ELinks should follow the original URL. Arguments: diff --git a/doc/python.txt b/doc/python.txt index a5225150..62707ed7 100644 --- a/doc/python.txt +++ b/doc/python.txt @@ -37,7 +37,8 @@ FUNCTIONS follow_url_hook(url) Rewrite a URL for a link that's about to be followed. - This function should return a URL for ELinks to follow, or None if + This function should return a string containing a URL for ELinks to + follow, or an empty string if no URL should be followed, or None if ELinks should follow the original URL. Arguments: @@ -47,7 +48,8 @@ FUNCTIONS goto_url_hook(url) Rewrite a URL that was entered in a "Go to URL" dialog box. - This function should return a URL for ELinks to follow, or None if + This function should return a string containing a URL for ELinks to + follow, or an empty string if no URL should be followed, or None if ELinks should follow the original URL. Arguments: