all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18203: 24.4.50; `ffap-url-p' should NOT be a defsubst
@ 2014-08-05 20:21 Drew Adams
  2015-12-25 19:44 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2014-08-05 20:21 UTC (permalink / raw)
  To: 18203

There is NO reason for this to be a defsubst.  There is no reason for
users not to take advantage of this function generally.

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-06-28 on ODIEONE
Bzr revision: 117431 rgm@gnu.org-20140628015517-eku6hj8mpgcvfnso
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
 LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#18203: 24.4.50; `ffap-url-p' should NOT be a defsubst
  2014-08-05 20:21 bug#18203: 24.4.50; `ffap-url-p' should NOT be a defsubst Drew Adams
@ 2015-12-25 19:44 ` Lars Ingebrigtsen
  2015-12-25 22:44   ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2015-12-25 19:44 UTC (permalink / raw)
  To: Drew Adams; +Cc: 18203

Drew Adams <drew.adams@oracle.com> writes:

> 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, 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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#18203: 24.4.50; `ffap-url-p' should NOT be a defsubst
  2015-12-25 19:44 ` Lars Ingebrigtsen
@ 2015-12-25 22:44   ` Drew Adams
  0 siblings, 0 replies; 3+ messages in thread
From: Drew Adams @ 2015-12-25 22:44 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 18203

> > 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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-25 22:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-05 20:21 bug#18203: 24.4.50; `ffap-url-p' should NOT be a defsubst Drew Adams
2015-12-25 19:44 ` Lars Ingebrigtsen
2015-12-25 22:44   ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.