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:
parent
7a8383c2d1
commit
63daee4b94
1 changed files with 9 additions and 5 deletions
|
@ -41,8 +41,12 @@
|
|||
(defun +sh-lookup-documentation-handler ()
|
||||
"Look up documentation in `man' or `woman'."
|
||||
(interactive)
|
||||
(call-interactively
|
||||
(require 'man)
|
||||
(let ((input (Man-default-man-entry)))
|
||||
(if (executable-find "man")
|
||||
#'man
|
||||
#'woman))
|
||||
(current-buffer))
|
||||
(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))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue