--- tooltip-help.el.1 2007-03-02 12:30:47.000000000 +0100 +++ tooltip-help.el 2008-05-25 21:09:14.000000000 +0200 @@ -59,6 +59,7 @@ (require 'help) (require 'eldoc) +(require 'cl) (global-set-key (kbd "") 'th-show-help) @@ -110,15 +111,18 @@ help)) -(defun th-elisp-get-help-text (func symbol) +(defun* th-elisp-get-help-text (func symbol &optional (bufname "*Help*")) (let ((pop-up-frames nil) - (wincfg (current-window-configuration))) - (if (get-buffer "*Help*") - (kill-buffer "*Help*")) + (wincfg (current-window-configuration)) + (result nil)) + (if (get-buffer bufname) + (kill-buffer bufname)) (funcall func symbol) - (if (get-buffer "*Help*") + (if (get-buffer bufname) (progn (set-window-configuration wincfg) - (with-current-buffer "*Help*" (buffer-string))) + (setq result (with-current-buffer bufname (buffer-string))) + (kill-buffer bufname) + result) "")))