Make general whitespace off/on functions.
This commit is contained in:
parent
f3416f144d
commit
edc89e030f
|
@ -1,6 +1,6 @@
|
|||
;;; appearance.el --- Configure appearance. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2019-10-14T15:00:50+00:00>
|
||||
;; Time-stamp: <2019-10-27T20:04:51+00:00>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -106,19 +106,21 @@
|
|||
(advice-add 'company-call-frontends
|
||||
:before #'my/on-off-whitespace-before-company)
|
||||
|
||||
;; popup:
|
||||
(defadvice popup-create (before my/popup-suppress-whitespace-mode activate)
|
||||
"Suspend whitespace-mode while popups are visible."
|
||||
(defun my/whitespace-mode-off ()
|
||||
(setq-local my/ws-enabled (my/whitespace-mode-enabled-p))
|
||||
(if my/ws-enabled
|
||||
(whitespace-mode -1)))
|
||||
(defadvice popup-delete (after my/popup-restore-whitespace-mode activate)
|
||||
"Restore whitespace-mode when all popups have closed."
|
||||
(defun my/whitespace-mode-on ()
|
||||
(if my/ws-enabled
|
||||
(whitespace-mode t)))
|
||||
|
||||
(defun my/whitespace-mode-off ()
|
||||
(whitespace-mode -1))
|
||||
;; popup:
|
||||
(defadvice popup-create (before my/popup-suppress-whitespace-mode activate)
|
||||
"Suspend whitespace-mode while popups are visible."
|
||||
(my/whitespace-mode-off))
|
||||
(defadvice popup-delete (after my/popup-restore-whitespace-mode activate)
|
||||
"Restore whitespace-mode when all popups have closed."
|
||||
(my/whitespace-mode-on))
|
||||
|
||||
(if (display-graphic-p)
|
||||
(custom-set-faces
|
||||
|
|
Loading…
Reference in New Issue
Block a user