diff options
| -rw-r--r-- | perspective.el | 7 |
1 files 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) |
