aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2025-07-05 13:29:46 +0300
committerEli Zaretskii2025-07-05 13:29:46 +0300
commita4712609b7ec920ca6883e71e782e2dac552a154 (patch)
treedb225e9f6cce09a0fb9976d1c79cf2f08fa9468c
parent4d14891850bec0dc73fc9284f2e0ddcd20e43fc1 (diff)
downloademacs-a4712609b7ec920ca6883e71e782e2dac552a154.tar.gz
emacs-a4712609b7ec920ca6883e71e782e2dac552a154.zip
Revert "New command 'mode-line-invisible-mode'"
This reverts commit 7e56ffd51bc5a00919f6a6af99fe9d329331a126. It caused failure to bootstrap. (Bug#78881)
-rw-r--r--doc/emacs/display.texi8
-rw-r--r--etc/NEWS7
-rw-r--r--lisp/bindings.el31
3 files changed, 0 insertions, 46 deletions
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index fca9aebe927..ad496b5b1cd 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1826,14 +1826,6 @@ further ``compress'' the mode line, you may customize the
1826and Emacs will hide some minor mode indicators on the mode line by 1826and Emacs will hide some minor mode indicators on the mode line by
1827collapsing them into a single clickable button. 1827collapsing them into a single clickable button.
1828 1828
1829@findex mode-line-invisible-mode
1830 By default, most buffers display a mode line, but if the mode line is
1831not useful in a buffer, you can use the command @w{@kbd{M-x
1832mode-line-invisible-mode}} to hide the mode line in the current buffer,
1833the mode line remains hidden until this command is called again. To
1834always hide the mode line when entering to a major mode, add
1835@code{mode-line-invisible-mode} to a hook @pxref{Hooks}.
1836
1837@node Text Display 1829@node Text Display
1838@section How Text Is Displayed 1830@section How Text Is Displayed
1839@cindex characters (in text) 1831@cindex characters (in text)
diff --git a/etc/NEWS b/etc/NEWS
index acb6e04f9cd..7504326374a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -353,13 +353,6 @@ This option allows changing or removing the delimiters shown around
353the major mode and list of minor modes in the mode line. The default 353the major mode and list of minor modes in the mode line. The default
354retains the existing behavior of inserting parentheses. 354retains the existing behavior of inserting parentheses.
355 355
356+++
357*** New minor mode 'mode-line-invisible-mode'.
358This minor mode makes the mode-line of the current buffer invisible.
359The command 'mode-line-invisible-mode' toggles the visibility of the
360current-buffer's mode-line. The default is to show the mode line of
361every buffer.
362
363** Tab Bars and Tab Lines 356** Tab Bars and Tab Lines
364 357
365--- 358---
diff --git a/lisp/bindings.el b/lisp/bindings.el
index d7ec11ca323..8b021a05ce2 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -56,37 +56,6 @@ corresponding to the mode line clicked."
56 (widen) 56 (widen)
57 (force-mode-line-update))) 57 (force-mode-line-update)))
58 58
59;; Variable used by `mode-line-invisible-mode' for
60;; store mode-line value in current buffer.
61(defvar-local mode-line-invisible--buf-state)
62
63(define-minor-mode mode-line-invisible-mode
64 "Toggle the mode-line visibility of the current buffer.
65Hide the mode line if it is shown, and show it if it's hidden."
66 :global nil
67 (if mode-line-invisible-mode
68 (progn
69 (add-hook 'after-change-major-mode-hook #'mode-line-invisible-mode nil t)
70 (setq mode-line-invisible--buf-state
71 (buffer-local-set-state mode-line-format nil)))
72
73 (remove-hook 'after-change-major-mode-hook #'mode-line-invisible-mode t)
74
75 (when mode-line-invisible--buf-state
76 (setq mode-line-invisible--buf-state
77 (buffer-local-restore-state mode-line-invisible--buf-state)))
78
79 ;; Display a mode line if buffer does not have one by default
80 (unless mode-line-format
81 (setq-local mode-line-format (default-value 'mode-line-format)))
82
83 ;; Update mode line
84 (when (called-interactively-p 'any)
85 (force-mode-line-update))))
86
87(put 'mode-line-invisible--buf-state 'permanent-local t)
88(put 'mode-line-invisible-mode 'permanent-local-hook t)
89
90(defvar mode-line-input-method-map 59(defvar mode-line-input-method-map
91 (let ((map (make-sparse-keymap))) 60 (let ((map (make-sparse-keymap)))
92 (define-key map [mode-line mouse-2] 61 (define-key map [mode-line mouse-2]