Change show-all keybinding to outline-cycle-buffer in pdf layer

Emacs 28 adds the outline-cycle-buffer feature. Currently there is no keybinding
to fold the outline of a pdf. So let's replace show-all by it for >= Emacs 28,
because it is easier to remember a single keybinding for folding and unfolding
then having separate bindings for those.
This commit is contained in:
Daniel Nicolai 2021-08-10 11:16:54 +02:00 committed by duianto
parent 8b05eb47c0
commit 3875f7a2fd
2 changed files with 4 additions and 2 deletions

View File

@ -189,7 +189,7 @@ differently from the default Evil search. To go to the next match, use ~C-s~.
| *Key binding* | *Description* |
|---------------+-------------------------------------------------------|
| ~S-tab~ | Expand all trees |
| ~S-tab~ | Expand all trees (Cycle trees for >= Emacs 28) |
| ~RET~ | Follow link |
| ~M-RET~ | Follow link and close outline window |
| ~o~ | Go to pdf view window |

View File

@ -104,7 +104,9 @@
"k" 'previous-line
"gk" 'outline-backward-same-level
"gj" 'outline-forward-same-level
(kbd "<backtab>") 'show-all
(kbd "<backtab>") (if (version< emacs-version "28.0")
'outline-show-all
'outline-cycle-buffer)
"gh" 'pdf-outline-up-heading
"gg" 'beginning-of-buffer
"G" 'pdf-outline-end-of-buffer