diff options
| author | Chris Lucas <chris@cjl.io> | 2020-12-01 20:06:37 -0500 |
|---|---|---|
| committer | Chris Lucas <chris@cjl.io> | 2020-12-01 20:06:37 -0500 |
| commit | c1df8293d1d0747bbd687fbde32aea182f9737b4 (patch) | |
| tree | 5d0b9cab367d24762af49ceefca69fab0192e1ef | |
| parent | 526bd63a6857a5b8a53b407b3a133233a639a1ae (diff) | |
Don't invoke persp-switch-hook on norecord
| -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) |
