branch: externals/window-commander
commit 9873ff1bd2f7ff4d60d1fbcefa3f71f1061ebedd
Author: Daniel Semyonov <cm...@dsemy.com>
Commit: Daniel Semyonov <cm...@dsemy.com>

    * swsw.el (swsw-select): Add before and after hooks.
---
 swsw.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/swsw.el b/swsw.el
index 1140c8a864..ca3d10d348 100644
--- a/swsw.el
+++ b/swsw.el
@@ -161,11 +161,13 @@ If set to `lighter', use the mode line lighter of 
`swsw-mode'"
   "Select window by its ID."
   ;; 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))))
   (if id
       (let ((window (cdr (assoc id swsw-window-list))))
         (when window
-          (select-window window)))
+          (select-window window)
+          (run-hooks 'swsw-after-select-hook)))
     (other-window 1)))
 
 ;;;; Display functions:

Reply via email to