diff options
| author | Lars Ingebrigtsen | 2022-05-13 21:24:12 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-05-13 21:24:12 +0200 |
| commit | dea41d4c24d0d33e359cbfe34054d9048761adfd (patch) | |
| tree | a9e1f4738e631d62e9f33ef68e4e4699dba3ff10 /src/buffer.c | |
| parent | 72b5b4194106d38432cd9892bc01e95d71bf75db (diff) | |
| download | emacs-dea41d4c24d0d33e359cbfe34054d9048761adfd.tar.gz emacs-dea41d4c24d0d33e359cbfe34054d9048761adfd.zip | |
Add new minor mode `header-line-indent-mode'
This is mostly factored out from tabulated-list.el (with bugs fixed).
* doc/lispref/modes.texi (Header Lines): Document it.
* lisp/display-line-numbers.el (header-line-indent): New variable.
(header-line-indent--line-number-width)
(header-line-indent--watch-line-number-width)
(header-line-indent--window-scroll-function): New helper functions.
(header-line-indent-mode): New minor mode.
* lisp/display-line-numbers.el (header-line-indent-width): New
variable.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-line-number-width)
(tabulated-list-watch-line-number-width)
(tabulated-list-window-scroll-function): Make into obsolete aliases.
(tabulated-list-mode): Use 'header-line-indent-mode'.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
Adjust the header line format and computation.
* src/buffer.c (syms_of_buffer): Mention header-line-indent-mode.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c index 57137b2a067..548d7b1c65c 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5598,8 +5598,11 @@ the mode line appears at the bottom. */); | |||
| 5598 | &BVAR (current_buffer, header_line_format), | 5598 | &BVAR (current_buffer, header_line_format), |
| 5599 | Qnil, | 5599 | Qnil, |
| 5600 | doc: /* Analogous to `mode-line-format', but controls the header line. | 5600 | doc: /* Analogous to `mode-line-format', but controls the header line. |
| 5601 | The header line appears, optionally, at the top of a window; | 5601 | The header line appears, optionally, at the top of a window; the mode |
| 5602 | the mode line appears at the bottom. */); | 5602 | line appears at the bottom. |
| 5603 | |||
| 5604 | Also see `header-line-indent-mode' if `display-line-number-mode' is | ||
| 5605 | used. */); | ||
| 5603 | 5606 | ||
| 5604 | DEFVAR_PER_BUFFER ("mode-line-format", &BVAR (current_buffer, mode_line_format), | 5607 | DEFVAR_PER_BUFFER ("mode-line-format", &BVAR (current_buffer, mode_line_format), |
| 5605 | Qnil, | 5608 | Qnil, |