0

The following function shows the documentation in a new frame. But it also shows the buffer storing the code. How can I show only the documentation, so the documentation fills the whole frame?

(defun qdesc (function) "Show the documentation for FUNCTION in a new Emacs frame." (interactive (list (function-called-at-point))) (let ( (help-frame (make-frame '((name . "Help") (minibuffer . nil) (width . 80) (height . 20)))) ) (with-selected-frame help-frame (describe-function function)))) 

2 Answers 2

0

Try this:

 ... (with-selected-frame help-frame (switch-to-buffer "*Help*") (describe-function function) (delete-other-windows)) ... 

Untested.

0

One way you can ensure that your call to describe-function uses the entire frame is by let-binding display-buffer-alist as shown below:

(defun qdesc (function) "Show the documentation for FUNCTION in a new Emacs frame." (interactive (list (function-called-at-point))) (let ((help-frame (make-frame '((name . "Help") (minibuffer . nil) (width . 80) (height . 20)))) (display-buffer-alist '((t display-buffer-full-frame)))) (with-selected-frame help-frame (describe-function function)))) 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.