25 lines
799 B
EmacsLisp
25 lines
799 B
EmacsLisp
|
;; 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."))))
|