From c1df8293d1d0747bbd687fbde32aea182f9737b4 Mon Sep 17 00:00:00 2001 From: Chris Lucas Date: Tue, 1 Dec 2020 20:06:37 -0500 Subject: Don't invoke persp-switch-hook on norecord --- perspective.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/perspective.el b/perspective.el index cffdd07..0bf194f 100644 --- a/perspective.el +++ b/perspective.el @@ -630,11 +630,12 @@ If NORECORD is non-nil, do not update the (set-frame-parameter nil 'persp--last (persp-curr)) (when (null persp) (setq persp (persp-new name))) - (run-hooks 'persp-before-switch-hook) + (unless norecord + (run-hooks 'persp-before-switch-hook)) (persp-activate persp) (unless norecord - (setf (persp-last-switch-time persp) (current-time))) - (run-hooks 'persp-switch-hook) + (setf (persp-last-switch-time persp) (current-time)) + (run-hooks 'persp-switch-hook)) name))) (defun persp-activate (persp) -- cgit v1.0