help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing documentation string of another function


From: Heime
Subject: Re: Printing documentation string of another function
Date: Wed, 10 Apr 2024 17:17:00 +0000





Sent with Proton Mail secure email.

On Thursday, April 11th, 2024 at 1:22 AM, Joost Kremers 
<joostkremers@fastmail.fm> wrote:

> On Wed, Apr 10 2024, Zhengyi Fu wrote:
> 
> > > 在 2024年4月10日,下午8:49,Heime heimeborgia@protonmail.com 写道:
> > > 
> > > Is it possible to have a function that prints the documentation string
> > > of another function ?
> > 
> > https://www.gnu.org/software/emacs/manual/html_node/elisp/Accessing-Documentation.html
> > I recommend you read the manual before asking here.
> 
> 
> I would also recommend using Emacs' own documentation system. `C-h i` starts 
> the
> info system. Press `h` for an introduction on using it.
> 
> --
> Joost Kremers
> Life has its moments

With the following implementation, I cannot get the documentation string 
of the appropriate function to display.

(defun avus-doc (seltr)
  "Print the documentation string of a particular function."

  (interactive
    (list
      (let ( (cseq '("Greek"   "Flokki")) )
        (completing-read "Doc: " cseq nil t "Greek"))))

  (pcase seltr
    ("Greek"     (documentation 'avus-greek))
    ("Flokki"    (documentation 'avus-flokki))) )




reply via email to

[Prev in Thread] Current Thread [Next in Thread]