Autoloading and binding cperl-perldoc allows you to conveniently browse the
Perl documentation without ever having loaded a Perl file in this
session. (In my case, for example, I tend to edit Perl on a remote server
and read documentation locally.)
XEmacs people, as I mentioned this in my
16860.42135.703800.617756(a)parhasard.net of January the sixth, to which there
were several energetic disagreements with other points, and as there were no
objections there to this point, I'm going ahead with the commit.
xemacs-packages/perl-modes/ChangeLog addition:
2005-02-09 Aidan Kehoe <kehoea(a)parhasard.net>
* cperl-mode.el: Autoload cperl-perldoc, cperl-perldoc-at-point.
* cperl-mode.el (cperl-mode-map):
Bind them to C-cC-hp, C-cC-hP, respectively.
XEmacs Packages source patch:
Diff command: cvs -q diff -u
Files affected: xemacs-packages/perl-modes/cperl-mode.el
Index: xemacs-packages/perl-modes/cperl-mode.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/perl-modes/cperl-mode.el,v
retrieving revision 1.6
diff -u -r1.6 cperl-mode.el
--- xemacs-packages/perl-modes/cperl-mode.el 2004/08/13 10:06:44 1.6
+++ xemacs-packages/perl-modes/cperl-mode.el 2005/02/09 01:46:34
@@ -2172,6 +2172,10 @@
[(control c) (control h) v]))
(cperl-define-key "\C-c\C-hf" 'cperl-info-on-current-command
[(control c) (control h) f])
+ (cperl-define-key "\C-c\C-hp" 'cperl-perldoc
+ [(control c) (control h) p])
+ (cperl-define-key "\C-c\C-hP" 'cperl-perldoc-at-point
+ [(control c) (control h) P])
(cperl-define-key "\C-c\C-hv"
;;(concat (char-to-string help-char) "v") ; does not work
'cperl-get-help
@@ -8142,6 +8146,7 @@
;;; Getting help on modules in C-h f ?
;;; This is a modified version of `man'.
;;; Need to teach it how to lookup functions
+;;;###autoload
(defun cperl-perldoc (word)
"Run `perldoc' on WORD."
(interactive
@@ -8173,6 +8178,7 @@
(t
(Man-getpage-in-background word)))))
+;;;###autoload
(defun cperl-perldoc-at-point ()
"Run a `perldoc' on the word around point."
(interactive)
--
“Ah come on now Ted, a Volkswagen with a mind of its own, driving all over
the place and going mad, if that’s not scary I don’t know what is.”