[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18203: 24.4.50; `ffap-url-p' should NOT be a defsubst
From: |
Drew Adams |
Subject: |
bug#18203: 24.4.50; `ffap-url-p' should NOT be a defsubst |
Date: |
Fri, 25 Dec 2015 14:44:16 -0800 (PST) |
> > There is NO reason for this to be a defsubst. There is no reason for
> > users not to take advantage of this function generally.
>
> I changed it to a defun,
Thank you.
> but I don't know what you mean by "There is no
> reason for users not to take advantage of this function generally.".
> You can use a defsubst just as you would a defun.
No, you cannot.
If existing code invokes a defsubst and you have only the compiled
version of that code, then you have no access to the function
defined by that defsubst. The function _does not exist_ at runtime.
You cannot advise it or debug it, and redefining it has no effect.
Taking advantage of the function _"generally"_ includes having it
available at runtime - it requires its existence _as a function_.
`defsubst's are almost a misfeature nowadays. In any case, they
be used should rarely, and only with good justification.