[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How does `describe-function' know where the source code of the function
From: |
Marcin Borkowski |
Subject: |
How does `describe-function' know where the source code of the function is? |
Date: |
Mon, 17 Jan 2022 05:03:50 +0100 |
User-agent: |
mu4e 1.1.0; emacs 28.0.50 |
Hi all,
If I define a function with `defun', C-h f gives me a link to the source
code of the function. I defined a macro defining a function (its
expansion contained a `defun'), and C-h f'ing that function did /not/
give me that link. I tried saying M-: (symbol-plist 'my-function), but
I haven't seen any property that would point to the source code. So, my
question is: how does `describe-function' know where the link should
point to (and if it should be rendered at all)? I skimmed its source
code, but it seems pretty convoluted. I found
`help-fns-function-description-header', but it seems that the actual
code finding the exact position of the function definition is buried
deep down the call chain, so I'm asking here in the hope that someone
could point me to the right place faster than me trying to edebug this
or something.
TIA,
--
Marcin Borkowski
http://mbork.pl
- How does `describe-function' know where the source code of the function is?,
Marcin Borkowski <=