Function: hui:menu-help
hui:menu-help is a byte-compiled function defined in hui-mini.el.
Signature
(hui:menu-help HELP-STR)
Documentation
Display HELP-STR in a small window at the bottom of the selected frame.
If HELP-STR is already displayed in a help window, instead quit from the help window.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20261018.1143/hui-mini.el
(defun hui:menu-help (help-str)
"Display HELP-STR in a small window at the bottom of the selected frame.
If HELP-STR is already displayed in a help window, instead quit from the
help window."
(let ((buf-name (hypb:help-buf-name "Menu"))
help-window)
(if (and (equal help-str hui:menu-last-help-string)
(setq help-window (get-buffer-window buf-name 'visible)))
;; When the same `help-str' is already displayed in a window, then
;; restore the prior window configuration
(hkey-help-hide nil help-window)
;; Otherwise, display `help-str'
(let* ((window-min-height 2)
(owind (selected-window)))
(unwind-protect
(progn
(save-window-excursion
(hkey-help-show buf-name)) ;; Needed to save wconfig.
(when (eq (selected-window) (minibuffer-window))
(other-window 1))
(and (= (window-top-line) 0)
(< (- (frame-height) (window-height)) 2)
(split-window-vertically nil))
(select-window (hui:bottom-window))
(when (switch-to-buffer (get-buffer-create buf-name))
(setq buffer-read-only nil)
(erase-buffer)
;; Ensure no line wrapping so table looks good
(toggle-truncate-lines 1)
(insert help-str)
(set-buffer-modified-p nil)
(setq buffer-read-only t
hui:menu-last-help-string help-str)
(fit-window-to-buffer)
(goto-char (point-min))))
(when (eq owind (minibuffer-window))
(select-window owind)))))))