"Tom Roche" <[EMAIL PROTECTED]> writes:
> Does anyone know of a "good way" to read perldoc (the Perl
> documentation format) from inside Emacs? By "good way" I mean better
> than M-x shell-command "perldoc whatever".
Tom,
`cperl-mode' includes `cperl-perldoc-at-point', but unfortunately it
depends on `/bin/sh'. Here's what I came up with that works for me;
add the following to your `.emacs' file:
(defun cperl-perldoc-at-point-dsr ()
"Run a `perldoc' on the word around point."
(interactive)
(let ((package (thing-at-point 'symbol)))
(let ((buffer-name (concat "*" package "*"))
(buffer-orig (buffer-name)))
(if (get-buffer buffer-name)
(kill-buffer buffer-name))
(switch-to-buffer-other-window buffer-name)
(call-process "perldoc" nil t nil package)
(goto-char (point-min))
(not-modified)
(help-mode)
(switch-to-buffer-other-window buffer-orig)
(message (concat "perldoc " package)))))
;; Function key mappings. Place your cursor on a Perl function
;; or module and use one of the following:
;;
;; F1 looks up documentation in Emacs info documentation for perl.
;; Ctrl-F1 runs perldoc on the module name at point.
;;
(setq cperl-mode-hook
(lambda nil
(cperl-define-key [f1] 'cperl-info-on-current-command)
(cperl-define-key [C-f1] 'cperl-perldoc-at-point-dsr)))
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]