mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix(sh): docs lookup handler must be invoked twice
Invoking +lookup/documentation in shell-script-mode will yield an "X man page formatted" in the minibuffer with no man page popup. It must be invoked a second time to see it. This commit fixes that.
This commit is contained in:
@ -41,8 +41,12 @@
|
||||
(defun +sh-lookup-documentation-handler ()
|
||||
"Look up documentation in `man' or `woman'."
|
||||
(interactive)
|
||||
(call-interactively
|
||||
(if (executable-find "man")
|
||||
#'man
|
||||
#'woman))
|
||||
(current-buffer))
|
||||
(require 'man)
|
||||
(let ((input (Man-default-man-entry)))
|
||||
(if (executable-find "man")
|
||||
(let* ((input (Man-translate-references input))
|
||||
(buffer (Man-getpage-in-background input)))
|
||||
(when (buffer-live-p buffer)
|
||||
(switch-to-buffer buffer)))
|
||||
(woman input t)
|
||||
(current-buffer))))
|
||||
|
Reference in New Issue
Block a user