From 7ee19f492a0d7c05f9ecdea70d2e22e4c5a48066 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Sun, 29 Jul 2018 19:14:59 +0200 Subject: [PATCH] Move hidden-mode-line-mode to the Org config --- configuration.org | 33 +++++++++++++++++++++++++++++++++ init.el | 1 - lisp/frame-manip.el | 24 ------------------------ 3 files changed, 33 insertions(+), 25 deletions(-) delete mode 100644 lisp/frame-manip.el diff --git a/configuration.org b/configuration.org index faa8283..88af6d1 100644 --- a/configuration.org +++ b/configuration.org @@ -351,6 +351,39 @@ name." "index.org"))) #+END_SRC +** Frame manipulation + +*** Hidden modeline mode + +To temporarily hide the mode line. + +Copied from http://emacs-doctor.com/emacs-strip-tease.html + +#+BEGIN_SRC emacs-lisp +(defvar hidden-mode-line-mode nil) +(defvar hide-mode-line nil) + +(define-minor-mode hidden-mode-line-mode + "Minor mode to hide the mode-line in the current buffer." + :init-value nil + :global nil + :variable hidden-mode-line-mode + :group 'editing-basics + (if hidden-mode-line-mode + (setq hide-mode-line mode-line-format + mode-line-format nil) + (setq mode-line-format hide-mode-line + hide-mode-line nil)) + (force-mode-line-update) + (redraw-display) + (when (and (called-interactively-p 'interactive) + hidden-mode-line-mode) + (run-with-idle-timer + 0 nil 'message + (concat "Hidden Mode Line Mode enabled. " + "Use M-x hidden-mode-line-mode to make mode-line appear.")))) +#+END_SRC + ** ~c-mode~ related *** Copy the prototype of the current function diff --git a/init.el b/init.el index c2950cf..5ffbc68 100644 --- a/init.el +++ b/init.el @@ -30,7 +30,6 @@ (load "round-number-to-decimals") (load "zim") (load "text-manip") -(load "frame-manip") (load "window-manip") (load "xdg-paths") (load "utils") diff --git a/lisp/frame-manip.el b/lisp/frame-manip.el deleted file mode 100644 index a8bbdad..0000000 --- a/lisp/frame-manip.el +++ /dev/null @@ -1,24 +0,0 @@ -;; Copied from http://emacs-doctor.com/emacs-strip-tease.html - -(defvar hidden-mode-line-mode nil) -(defvar hide-mode-line nil) - -(define-minor-mode hidden-mode-line-mode - "Minor mode to hide the mode-line in the current buffer." - :init-value nil - :global nil - :variable hidden-mode-line-mode - :group 'editing-basics - (if hidden-mode-line-mode - (setq hide-mode-line mode-line-format - mode-line-format nil) - (setq mode-line-format hide-mode-line - hide-mode-line nil)) - (force-mode-line-update) - (redraw-display) - (when (and (called-interactively-p 'interactive) - hidden-mode-line-mode) - (run-with-idle-timer - 0 nil 'message - (concat "Hidden Mode Line Mode enabled. " - "Use M-x hidden-mode-line-mode to make mode-line appear."))))