org-export: Propertize keybindings in Org Export dispatch UI

* lisp/ox.el (org-export--dispatch-ui): Propertize the navigational
keybindings.
This commit is contained in:
Rudolf Adamkovič 2022-10-07 17:05:15 +02:00 committed by Ihor Radchenko
parent 96af4a8634
commit e7feeb2225
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 14 additions and 2 deletions

View File

@ -7123,8 +7123,20 @@ back to standard interface."
(delete-other-windows)
(org-switch-to-buffer-other-window
(get-buffer-create "*Org Export Dispatcher*"))
(setq cursor-type nil
header-line-format "Use SPC, DEL, C-n or C-p to navigate.")
(setq cursor-type nil)
(setq header-line-format
(let ((propertize-help-key
(lambda (key)
;; Add `face' *and* `font-lock-face' to "work
;; reliably in any buffer", per a comment in
;; `help--key-description-fontified'.
(propertize key
'font-lock-face 'help-key-binding
'face 'help-key-binding))))
(apply 'format
(cons "Use %s, %s, %s, or %s to navigate."
(mapcar propertize-help-key
(list "SPC" "DEL" "C-n" "C-p"))))))
;; Make sure that invisible cursor will not highlight square
;; brackets.
(set-syntax-table (copy-syntax-table))