summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--init.org10
1 files changed, 4 insertions, 6 deletions
diff --git a/init.org b/init.org
index e63c091..39df698 100644
--- a/init.org
+++ b/init.org
@@ -1305,12 +1305,10 @@
(switch-window-threshold 3))
:config
(defun jao-switch-window--then (prompt cmd)
- (let ((d default-directory))
- (switch-window--then prompt
- cmd
- `(lambda ()
- (let ((default-directory ,d))
- (call-interactively ',cmd))))))
+ (let ((f `(lambda ()
+ (let ((default-directory ,default-directory))
+ (call-interactively ',cmd)))))
+ (switch-window--then prompt f f)))
(defun jao-switch-window-then-dired ()
(interactive)