summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar AntolĂ­n Camarena <omar.antolin@gmail.com>2025-04-23 10:50:02 -0600
committerGitHub <noreply@github.com>2025-04-23 10:50:02 -0600
commit923d0ec52e2e3e0ae44e497c31c7888e87d08a8f (patch)
tree2fc7abcf02c58b96f64b285afe61d267df09e548
parent3750901e7f1ce0ecca94c102826245dadec94a04 (diff)
parenta6e48a4e09edca1f9390d8f943b8fb266b4aa905 (diff)
Merge pull request #750 from LemonBreezes/work-around-browse-url-interactive-arg
fix: limit set--this-command-keys to browse-url
-rw-r--r--embark.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/embark.el b/embark.el
index 58ca314..913f8bd 100644
--- a/embark.el
+++ b/embark.el
@@ -2070,12 +2070,15 @@ minibuffer before executing the action."
(embark--run-action-hooks embark-pre-action-hooks
action target quit)
(minibuffer-with-setup-hook inject
- ;; pacify commands that use (this-command-keys)
- (when (= (length (this-command-keys)) 0)
+ ;; HACK work around `browse-url-interactive-arg'
+ ;; expecting a non-empty `this-command-keys'
+ ;; output.
+ (when (and (eq action 'browse-url)
+ (= (length (this-command-keys)) 0))
(set--this-command-keys
(if (characterp last-command-event)
(string last-command-event)
- "\r")))
+ "\r")))
(setq this-command action)
(embark--run-around-action-hooks
action target quit)))