diff --git a/scripts/emacs/phafi-mode.el b/scripts/emacs/phafi-mode.el index fb3bb2c936fce79e3b72773913785efac4d62982..4ca4cea150c87f2f6ed6ec9414079a9036e01876 100644 --- a/scripts/emacs/phafi-mode.el +++ b/scripts/emacs/phafi-mode.el @@ -431,6 +431,16 @@ ) +(defun phafi-describe-function () + "Display the full documentation of FUNCTION, using pman" + (interactive) + (let* ((str (shell-command-to-string (concat "pman " (current-word)))) + (str (replace-regexp-in-string "\\\\" "" str))) + (with-output-to-temp-buffer "*Pman*" + (princ str)) + (balance-windows-area))) + + (define-minor-mode phafi-mode "Toggle AFI-OPAC mode." :lighter " phafi" @@ -447,6 +457,7 @@ ("\C-cp" . phafi-toggle-phpunit-profiling) ("\C-ce" . phafi-eval-region) ("\C-cf" . phafi-strftime) + ("\C-cd" . phafi-describe-function) ("\C-ct" . phafi-find-tests) ("\C-cj" . phafi-jump-to)) :after-hook 'phafi-mode-hook) @@ -509,3 +520,6 @@ (message (concat "Current direcotry= " (phafi-cur-dir))) ) + + +