From 8851dba8f3c9b48f8fa7a966273ac9251436636b Mon Sep 17 00:00:00 2001 From: llaffont <laurent.laffont@gmail.com> Date: Mon, 20 Jan 2014 11:41:32 +0100 Subject: [PATCH] Phafi - utlisation de pman pour voir les docs --- scripts/emacs/phafi-mode.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/emacs/phafi-mode.el b/scripts/emacs/phafi-mode.el index fb3bb2c936f..4ca4cea150c 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))) ) + + + -- GitLab