diff options
| author | Eli Zaretskii | 2025-07-05 13:29:46 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2025-07-05 13:29:46 +0300 |
| commit | a4712609b7ec920ca6883e71e782e2dac552a154 (patch) | |
| tree | db225e9f6cce09a0fb9976d1c79cf2f08fa9468c | |
| parent | 4d14891850bec0dc73fc9284f2e0ddcd20e43fc1 (diff) | |
| download | emacs-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.texi | 8 | ||||
| -rw-r--r-- | etc/NEWS | 7 | ||||
| -rw-r--r-- | lisp/bindings.el | 31 |
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 | |||
| 1826 | and Emacs will hide some minor mode indicators on the mode line by | 1826 | and Emacs will hide some minor mode indicators on the mode line by |
| 1827 | collapsing them into a single clickable button. | 1827 | collapsing 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 | ||
| 1831 | not useful in a buffer, you can use the command @w{@kbd{M-x | ||
| 1832 | mode-line-invisible-mode}} to hide the mode line in the current buffer, | ||
| 1833 | the mode line remains hidden until this command is called again. To | ||
| 1834 | always 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) |
| @@ -353,13 +353,6 @@ This option allows changing or removing the delimiters shown around | |||
| 353 | the major mode and list of minor modes in the mode line. The default | 353 | the major mode and list of minor modes in the mode line. The default |
| 354 | retains the existing behavior of inserting parentheses. | 354 | retains the existing behavior of inserting parentheses. |
| 355 | 355 | ||
| 356 | +++ | ||
| 357 | *** New minor mode 'mode-line-invisible-mode'. | ||
| 358 | This minor mode makes the mode-line of the current buffer invisible. | ||
| 359 | The command 'mode-line-invisible-mode' toggles the visibility of the | ||
| 360 | current-buffer's mode-line. The default is to show the mode line of | ||
| 361 | every 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. | ||
| 65 | Hide 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] |