diff options
| author | Craig Jennings <c@cjennings.net> | 2025-10-20 11:30:05 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-10-20 11:30:05 -0500 |
| commit | 6486709e40a4a5fe1cf40e48f6ed327eff8420d5 (patch) | |
| tree | d8faa01c0ba1f35df058c7081d4683c5dbc51810 | |
| parent | 8dea319d4de8f9e178fed6e8ddb706ec569539a1 (diff) | |
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.
| -rw-r--r-- | modules/external-open.el | 5 |
1 files changed, 4 insertions, 1 deletions
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 ------------------- |
