for my $i (1..10) ^^ ^^ #### (require 'pos-tip) (add-hook 'cperl-mode-hook (lambda () (cperl-toggle-autohelp) (setq cperl-lazy-help-time 2) (defun cperl-describe-perl-symbol (val) "Display the documentation of symbol at point, a Perl operator." (let ((enable-recursive-minibuffers t) args-file regexp) (cond ((string-match "^[&*][a-zA-Z_]" val) (setq val (concat (substring val 0 1) "NAME"))) ((string-match "^[$@]\\([a-zA-Z_:0-9]+\\)[ \t]*\\[" val) (setq val (concat "@" (substring val 1 (match-end 1))))) ((string-match "^[$@]\\([a-zA-Z_:0-9]+\\)[ \t]*{" val) (setq val (concat "%" (substring val 1 (match-end 1))))) ((and (string= val "x") (string-match "^x=" val)) (setq val "x=")) ((string-match "^\\$[\C-a-\C-z]" val) (setq val (concat "$^" (char-to-string (+ ?A -1 (aref val 1)))))) ((string-match "^CORE::" val) (setq val "CORE::")) ((string-match "^SUPER::" val) (setq val "SUPER::")) ((and (string= "<" val) (string-match "^<\\$?[a-zA-Z0-9_:]+>" val)) (setq val ""))) (setq regexp (concat "^" "\\([^a-zA-Z0-9_:]+[ \t]+\\)?" (regexp-quote val) "\\([ \t([/]\\|$\\)")) ;; get the buffer with the documentation text (cperl-switch-to-doc-buffer) ;; lookup in the doc (goto-char (point-min)) (let ((case-fold-search nil)) (list (if (re-search-forward regexp (point-max) t) (save-excursion (beginning-of-line 1) (let ((lnstart (point))) (end-of-line) (pos-tip-show (buffer-substring lnstart (point))))) (if cperl-message-on-help-error (message "No definition for %s" val))))))) ))