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 ()
|
(defun +sh-lookup-documentation-handler ()
|
||||||
"Look up documentation in `man' or `woman'."
|
"Look up documentation in `man' or `woman'."
|
||||||
(interactive)
|
(interactive)
|
||||||
(call-interactively
|
(require 'man)
|
||||||
|
(let ((input (Man-default-man-entry)))
|
||||||
(if (executable-find "man")
|
(if (executable-find "man")
|
||||||
#'man
|
(let* ((input (Man-translate-references input))
|
||||||
#'woman))
|
(buffer (Man-getpage-in-background input)))
|
||||||
(current-buffer))
|
(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