diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-13 17:15:07 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-13 17:15:07 -0500 |
| commit | c67233b9100ab61bff0304cea621c3cee89b55e9 (patch) | |
| tree | 477c417c45d8ab4cefa1d2a984236dd70ce42aaf /modules | |
| parent | b070b3bbc1c68aebc18e138cef0ba330116b6485 (diff) | |
| download | dotemacs-c67233b9100ab61bff0304cea621c3cee89b55e9.tar.gz dotemacs-c67233b9100ab61bff0304cea621c3cee89b55e9.zip | |
chore(org-capture): clear the module's byte-compile warnings
I removed the remove-hook shim that swapped the retired popup handler out of a live daemon on module reload. The handler it names was deleted long ago and both daemons have restarted since, so the shim's only remaining effect was a not-known-to-be-defined warning.
I also declared org-capture-mode-map for the compiler (it's only ever touched inside with-eval-after-load) and reflowed one over-wide docstring. The module now byte-compiles with zero warnings.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/org-capture-config.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/org-capture-config.el b/modules/org-capture-config.el index ca5a0a21..b7250f1e 100644 --- a/modules/org-capture-config.el +++ b/modules/org-capture-config.el @@ -157,6 +157,8 @@ re-scanning large target files after the first successful lookup." (interactive) (user-error "Key disabled during capture -- finalize with C-c C-c or abort with C-c C-k")) +(defvar org-capture-mode-map) + (with-eval-after-load 'org-capture (dolist (key '("<f1>" "<f10>" "<f11>" "<f12>" "M-SPC")) (keymap-set org-capture-mode-map key #'cj/--org-capture-blocked-key))) @@ -381,10 +383,10 @@ A popup still mid-capture has capture UI and is not reapable, so it is spared." (defun cj/org-capture-reap-popup-frames () "Delete every quick-capture popup frame that no longer shows capture UI. Reaps across ALL frames, not just the selected one: a capture that finalizes, -aborts, or errors while the daemon's selected frame is something else (the common -multi-frame case) still cleans up its \"org-capture\" popup, while a popup -mid-capture is spared. Never deletes the last remaining frame. Safe to call -anytime — bound to nothing, run via M-x when a stray popup needs clearing." +aborts, or errors while the daemon's selected frame is something else (the +common multi-frame case) still cleans up its \"org-capture\" popup, while a +popup mid-capture is spared. Never deletes the last remaining frame. Safe to +call anytime — bound to nothing, run via M-x when a stray popup needs clearing." (interactive) (dolist (f (frame-list)) (when (and (frame-live-p f) @@ -395,9 +397,7 @@ anytime — bound to nothing, run via M-x when a stray popup needs clearing." (window-list f 'no-minibuf)))) (delete-frame f)))) -;; Reap on every capture exit. `remove-hook' first so a live module reload swaps -;; the retired narrow (selected-frame) handler for this one without leaving both. -(remove-hook 'org-capture-after-finalize-hook #'cj/org-capture--delete-popup-frame) +;; Reap on every capture exit. (add-hook 'org-capture-after-finalize-hook #'cj/org-capture-reap-popup-frames) ;; The popup opens a fresh emacsclient frame still showing the daemon's last |
