emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/swsw 082e03382e 033/146: * swsw.el (swsw-select): Ensure '


From: ELPA Syncer
Subject: [nongnu] elpa/swsw 082e03382e 033/146: * swsw.el (swsw-select): Ensure 'swsw-after-select-hook' runs.
Date: Wed, 25 May 2022 02:59:41 -0400 (EDT)

branch: elpa/swsw
commit 082e03382e53ce83357520321cc6fcd47793223b
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>

    * swsw.el (swsw-select): Ensure 'swsw-after-select-hook' runs.
---
 swsw.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/swsw.el b/swsw.el
index a061d60985..b60604e3c7 100644
--- a/swsw.el
+++ b/swsw.el
@@ -218,12 +218,13 @@ If set to `lighter', use the mode line lighter of 
`swsw-mode'"
   ;; If there are less than 3 windows, don't get an ID.
   (interactive (unless (< (length swsw-window-list) 3)
                  (run-hooks 'swsw-before-select-hook)
-                 (swsw--read-id (swsw--get-id-length))))
+                 (unwind-protect
+                     (swsw--read-id (swsw--get-id-length))
+                   (run-hooks 'swsw-after-select-hook))))
   (if id
       (let ((window (cdr (assoc id swsw-window-list))))
         (when window
-          (select-window window)
-          (run-hooks 'swsw-after-select-hook)))
+          (select-window window)))
     (other-window 1)))
 
 ;;;; Display functions:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]