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 | 722f8bc82ed2c40920ef591c2443a6f9a8bef54b (patch) | |
| tree | 96e467cdb2f3eecffdf06245cdef6275855b1741 /modules/external-open.el | |
| parent | 5d841ffa8db4886f980662e4a84fbc52ef60a5c0 (diff) | |
| download | dotemacs-722f8bc82ed2c40920ef591c2443a6f9a8bef54b.tar.gz dotemacs-722f8bc82ed2c40920ef591c2443a6f9a8bef54b.zip | |
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.
Diffstat (limited to 'modules/external-open.el')
| -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 0fe6be642..41d842fbc 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 ------------------- |
