From 6486709e40a4a5fe1cf40e48f6ed327eff8420d5 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 20 Oct 2025 11:30:05 -0500 Subject: refactor: external-open: Update key binding to use keymap-global-set - Declare platform-specific functions for shell execution on Windows. - Transition from `global-set-key` to `keymap-global-set` for improved clarity and consistency when binding the "C-c x o" shortcut. --- modules/external-open.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/external-open.el b/modules/external-open.el index 0fe6be64..41d842fb 100644 --- a/modules/external-open.el +++ b/modules/external-open.el @@ -25,6 +25,9 @@ (require 'host-environment) ;; environment information functions (require 'cl-lib) +;; Declare platform-specific functions +(declare-function w32-shell-execute "w32fns.c" (operation document &optional parameters show-flag)) + (defgroup external-open nil "Open certain files with the OS default handler." :group 'files) @@ -106,7 +109,7 @@ command (shell-quote-argument file)) nil 0))))) -(global-set-key (kbd "C-c x o") #'cj/open-this-file-with) +(keymap-global-set "C-c x o" #'cj/open-this-file-with) ;; -------------------- Open Files With Default File Handler ------------------- -- cgit v1.2.3