spacemacs-navigation: remove duplicate code

This commit is contained in:
Kalle Lindqvist 2018-06-14 17:33:33 +02:00 committed by Sylvain Benner
parent d7f5b58890
commit 2007ce3f1a

View file

@ -222,47 +222,6 @@ If the universal prefix argument is used then kill also the window."
(interactive)
(setq scroll-conservatively 0))
;; zoom
(defun spacemacs//zoom-frm-powerline-reset ()
(when (fboundp 'powerline-reset)
(setq-default powerline-height (spacemacs/compute-mode-line-height))
(powerline-reset)))
(defun spacemacs//zoom-frm-do (arg)
"Perform a zoom action depending on ARG value."
(let ((zoom-action (cond ((eq arg 0) 'zoom-frm-unzoom)
((< arg 0) 'zoom-frm-out)
((> arg 0) 'zoom-frm-in)))
(fm (cdr (assoc 'fullscreen (frame-parameters))))
(fwp (* (frame-char-width) (frame-width)))
(fhp (* (frame-char-height) (frame-height))))
(when (equal fm 'maximized)
(toggle-frame-maximized))
(funcall zoom-action)
(set-frame-size nil fwp fhp t)
(when (equal fm 'maximized)
(toggle-frame-maximized))))
(defun spacemacs/zoom-frm-in ()
"zoom in frame, but keep the same pixel size"
(interactive)
(spacemacs//zoom-frm-do 1)
(spacemacs//zoom-frm-powerline-reset))
(defun spacemacs/zoom-frm-out ()
"zoom out frame, but keep the same pixel size"
(interactive)
(spacemacs//zoom-frm-do -1)
(spacemacs//zoom-frm-powerline-reset))
(defun spacemacs/zoom-frm-unzoom ()
"Unzoom current frame, keeping the same pixel size"
(interactive)
(spacemacs//zoom-frm-do 0)
(spacemacs//zoom-frm-powerline-reset))
;; ace-link