fix(popup): add wdired hacks

Previously, wdired actions will not close popup windows, which is
cumbersome to use. We've already added similar hacks to dired. Now it's
time to add similar hacks to wdired.
This commit is contained in:
Amos Bird 2023-09-06 20:33:27 +08:00 committed by GitHub
parent af5add0e9e
commit 0e8f458d99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -372,6 +372,12 @@ Ugh, such an ugly hack."
(letf! ((#'switch-to-buffer-other-window #'pop-to-buffer)) (letf! ((#'switch-to-buffer-other-window #'pop-to-buffer))
(apply fn args)))) (apply fn args))))
;;;###package wdired
(progn
;; close the popup after you're done with a wdired buffer
(advice-add #'wdired-abort-changes :after #'+popup-close-a)
(advice-add #'wdired-finish-edit :after #'+popup-close-a))
;;;###package wgrep ;;;###package wgrep
(progn (progn
;; close the popup after you're done with a wgrep buffer ;; close the popup after you're done with a wgrep buffer