diff options
| author | gcv <gepardcv@gmail.com> | 2020-12-02 22:33:55 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-02 22:33:55 -0800 |
| commit | 7d747f50464e5c518bc6963e66d6d378ac3e9add (patch) | |
| tree | 5d0b9cab367d24762af49ceefca69fab0192e1ef | |
| parent | 526bd63a6857a5b8a53b407b3a133233a639a1ae (diff) | |
| parent | c1df8293d1d0747bbd687fbde32aea182f9737b4 (diff) | |
Merge pull request #140 from cjlucas/ignore-persp-switch-hooks-on-norecord
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) |
