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

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

[nongnu] elpa/swsw 9873ff1bd2 020/146: * swsw.el (swsw-select): Add befo


From: ELPA Syncer
Subject: [nongnu] elpa/swsw 9873ff1bd2 020/146: * swsw.el (swsw-select): Add before and after hooks.
Date: Wed, 25 May 2022 02:59:39 -0400 (EDT)

branch: elpa/swsw
commit 9873ff1bd2f7ff4d60d1fbcefa3f71f1061ebedd
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@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

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