[Conkeror] [PATCH] Optionally don't select (highlight) alternative url.
David Kettler
David.Kettler at dsto.defence.gov.au
Sun Nov 2 21:51:16 PST 2008
The user variable minibuffer_read_url_select_initial allows this
behaviour to be specified.
---
When I press C-x C-v, I want to edit the existing URL, and I usually
start by pressing back_space or M-back_space. But if it's selected,
that will delete the whole URL. That's inconvenient. Emacs doesn't
do that.
The name of the variable is clumsy.
---
modules/content-buffer.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules/content-buffer.js b/modules/content-buffer.js
index 87c99d1..4ed6e18 100644
--- a/modules/content-buffer.js
+++ b/modules/content-buffer.js
@@ -292,6 +292,9 @@ define_variable("url_completion_use_bookmarks", true, "Specifies whether URL com
define_variable("url_completion_use_history", false,
"Specifies whether URL completion should complete using browser history.");
+define_variable("minibuffer_read_url_select_initial", true,
+ "Specifies whether a URL presented in the minibuffer for editing should be selected. This affects find-alternate-url.");
+
minibuffer_auto_complete_preferences["url"] = true;
minibuffer.prototype.read_url = function () {
keywords(arguments, $prompt = "URL:", $history = "url", $initial_value = "",
@@ -307,7 +310,7 @@ minibuffer.prototype.read_url = function () {
$completer = completer,
$initial_value = arguments.$initial_value,
$auto_complete = "url",
- $select,
+ $select = minibuffer_read_url_select_initial,
$match_required = false);
if (result == "") // well-formedness check. (could be better!)
throw ("invalid url or webjump (\""+ result +"\")");
--
1.6.0.2.605.g208f6.dirty
--
IMPORTANT: This email remains the property of the Australian Defence
Organisation and is subject to the jurisdiction of section 70 of the
CRIMES ACT 1914. If you have received this email in error, you are
requested to contact the sender and delete the email.
More information about the Conkeror
mailing list