Disable goggles for certain puni functions
This commit is contained in:
parent
c3e8f5d5e6
commit
5fb493234c
16
init.el
16
init.el
|
@ -150,7 +150,21 @@
|
||||||
("C-c p r" . puni-raise)
|
("C-c p r" . puni-raise)
|
||||||
("C-c p C-s" . puni-splice)
|
("C-c p C-s" . puni-splice)
|
||||||
("C-c p s" . puni-split)
|
("C-c p s" . puni-split)
|
||||||
("C-c p z" . puni-squeeze)))
|
("C-c p z" . puni-squeeze))
|
||||||
|
:config
|
||||||
|
(with-eval-after-load 'goggles
|
||||||
|
(dolist (fun '(puni-slurp-forward
|
||||||
|
puni-barf-forward
|
||||||
|
puni-slurp-backward
|
||||||
|
puni-barf-backward
|
||||||
|
puni-raise))
|
||||||
|
(advice-add fun :around (lambda (oldfun &rest r)
|
||||||
|
(let ((old-goggles-mode goggles-mode))
|
||||||
|
(goggles-mode 0)
|
||||||
|
(let ((ret (apply oldfun r)))
|
||||||
|
(when old-goggles-mode
|
||||||
|
(goggles-mode))
|
||||||
|
ret)))))))
|
||||||
|
|
||||||
(use-package ace-window
|
(use-package ace-window
|
||||||
:bind ("C-c w" . ace-window)
|
:bind ("C-c w" . ace-window)
|
||||||
|
|
Loading…
Reference in a new issue