GNU bug report logs - #23957
[PATCH] Make fboundp an alias for symbol-function

Previous Next

Package: emacs;

Reported by: Robert Cochran <robert-emacs <at> cochranmail.com>

Date: Tue, 12 Jul 2016 15:50:03 UTC

Severity: wishlist

Tags: fixed, patch

Merged with 23988

Fixed in version 25.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Robert Cochran <robert-emacs <at> cochranmail.com>
Cc: Philipp Stephani <p.stephani2 <at> gmail.com>, 23957 <at> debbugs.gnu.org
Subject: bug#23957: [PATCH] Make fboundp an alias for symbol-function
Date: Tue, 12 Jul 2016 20:06:54 +0000 (UTC)
> I didn't put too much thought into reading the FIXME;

Nor did I. ;-)

> I figured that someone smarter than myself knew what they were
> doing when requesting the change.

Yes, no doubt s?he had a good reason.  Or at least a reason.
But apparently it was not recorded, so we can only wonder or
guess.

My guess is that the person just figured that, like `member',
people can use `symbol-function' as a general Boolean - which
is true.  But `fboundp' has been around forever, and there is
no telling what code might expect its value to be either `t'
or `nil'.  And if someone really wants to use `symbol-function'
to either get the function or test whether there is one, s?he
can already do that.

> I'd personally argue that anyone making an explicit check for t, or
> anything that particularly needs t rather than any true value is just
> asking for lossage, but I can see why people would disagree with that
> assertion.

It doesn't matter what we might think of such a check.  The point
is that such checks might exist, and there is really no good
reason (that I can see) for breaking such code.  Again: anyone
can already use `symbol-function' to get the desired effect, and
its name speaks much better to the combined behavior desired in
that case.

> FWIW, In every placed I changed occurrences of fboundp to
> symbol-function, both in Lisp and C, used only the truthiness
> of the return rather than explicitly checking for t.

That's irrelevant (IMO).  The code that GNU distributes with
Emacs is but a small part of the Emacs-Lisp code that is out
there.

> I also ran the test suite with and without my patch applied,
> and noticed no difference in the number of failing tests.

Again - you were testing in the tiny GNU Emacs distributed-code
sandbox.  The Emacs world is a much bigger box.

> Anyways, I'm willing to toss this patch and do something else
> if that is the general consensus.

I can't speak for the consensus, but that would be my hope.  And
thanks for pitching in!  Sorry to seem so critical of a first foray
into helping.




This bug report was last modified 9 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.