Load window-purpose when window configuration changes
This commit is contained in:
parent
ea0f73ec31
commit
d19a20beb4
|
@ -47,8 +47,8 @@ If FUNC is a lambda you must give it a name with FNAME. "
|
|||
result)
|
||||
(setq result
|
||||
(append (when fname
|
||||
`((fset ',fname (lambda () (funcall #',func)))))
|
||||
`((fset ',hfunc (lambda ()
|
||||
`((fset ',fname (lambda (&rest _) (funcall #',func)))))
|
||||
`((fset ',hfunc (lambda (&rest _)
|
||||
,(if fname (list fname) (list func))
|
||||
,(if (functionp hook)
|
||||
`(advice-remove ',hook ',hfunc)
|
||||
|
|
|
@ -108,9 +108,11 @@
|
|||
:defer (spacemacs/defer 1)
|
||||
:init
|
||||
(progn
|
||||
(spacemacs|add-transient-hook pre-command-hook
|
||||
(lambda () (require 'window-purpose))
|
||||
lazy-load-window-purpose)
|
||||
(add-hook 'emacs-startup-hook
|
||||
(lambda ()
|
||||
(spacemacs|add-transient-hook window-configuration-change-hook
|
||||
(lambda () (require 'window-purpose))
|
||||
lazy-load-window-purpose)))
|
||||
;; 'r' is for "puRpose" ('w', 'p' are crowded, 'W', 'P' aren't
|
||||
;; comfortable)
|
||||
(spacemacs/set-leader-keys
|
||||
|
|
Loading…
Reference in New Issue