From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: bug#6486: documentation of `byte-code-function-p' should mention `symbol-function' and xref manual Date: Mon, 21 Jun 2010 22:53:08 -0600 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1277182744 27600 80.91.229.12 (22 Jun 2010 04:59:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Jun 2010 04:59:04 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 22 06:59:03 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OQvZf-0003GF-Al for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Jun 2010 06:59:03 +0200 Original-Received: from localhost ([127.0.0.1]:37747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQvZe-0001eB-Qt for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Jun 2010 00:59:02 -0400 Original-Received: from [140.186.70.92] (port=40450 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQvZZ-0001ce-Ks for bug-gnu-emacs@gnu.org; Tue, 22 Jun 2010 00:58:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQvZY-0006LJ-G2 for bug-gnu-emacs@gnu.org; Tue, 22 Jun 2010 00:58:57 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59263) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQvZY-0006LE-CS for bug-gnu-emacs@gnu.org; Tue, 22 Jun 2010 00:58:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OQvUo-0003b3-AK; Tue, 22 Jun 2010 00:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kevin Rodgers Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Jun 2010 04:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.127718240913816 (code B ref -1); Tue, 22 Jun 2010 04:54:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Jun 2010 04:53:29 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQvUG-0003an-Oa for submit@debbugs.gnu.org; Tue, 22 Jun 2010 00:53:29 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQvUC-0003ab-PO for submit@debbugs.gnu.org; Tue, 22 Jun 2010 00:53:25 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:47656) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OQvU9-00071W-Ha for submit@debbugs.gnu.org; Tue, 22 Jun 2010 00:53:21 -0400 Original-Received: from [140.186.70.92] (port=56240 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQvU8-00010X-8v for bug-gnu-emacs@gnu.org; Tue, 22 Jun 2010 00:53:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQvU7-0005qI-3x for bug-gnu-emacs@gnu.org; Tue, 22 Jun 2010 00:53:19 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:40528) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQvU6-0005q2-MS for bug-gnu-emacs@gnu.org; Tue, 22 Jun 2010 00:53:19 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OQvU0-0001RM-0t for bug-gnu-emacs@gnu.org; Tue, 22 Jun 2010 06:53:12 +0200 Original-Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jun 2010 06:53:12 +0200 Original-Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jun 2010 06:53:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 76 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 22 Jun 2010 00:54:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37941 Archived-At: MON KEY wrote: > The documentation of function `byte-code-function-p' should mention > usage requires `symbol-function', and/or should refer to a relevant > portion of the manual. > > ,---- (documentation 'byte-code-function-p) > | > | Return t if OBJECT is a byte-compiled function object. > | > | (fn OBJECT) > | > `---- > > The above docs do not adequately indicate that the OBJECT arg is as > per the return value of `symbol-function'. e.g.: > > (byte-code-function-p 'disassemble) > ;=> nil > > (byte-code-function-p (symbol-function 'disassemble)) > ;=> t > > How is the user supposed to know that OBJECT will only return t if it > is the unreadable vector returned by `symbol-function'? From (elisp)What Is a Function: Unlike `functionp', the next three functions do _not_ treat a symbol as its function definition. -- Function: subrp object ... -- Function: byte-code-function-p object This function returns `t' if OBJECT is a byte-code function. For example: (byte-code-function-p (symbol-function 'next-line)) => t -- Function: subr-arity subr ... > Please add documentation of such, along with info node xref such as: > > See info node `(elisp) Byte-Code Objects' Nah, that is why we have M-x elisp-index-search -- although it might be nice if such links were automatically generated by the describe-* commands. > Also, note that the nature of the data-structure/readability of a > byte-code'd function can not be deduced by the user by simply reading > the manual section: > > (info "(elisp)What Is a Function") The nature of several types can't be deduced by the node that describes the corresponding predicate, but by the node that actually describes the type (under the Programming Types or Editing Types node). (elisp)What Is a Function does say: "byte-code function" A "byte-code function" is a function that has been compiled by the byte compiler. *Note Byte-Code Type::. And (elisp)Byte-Code Type (referenced above) says: The printed representation and read syntax for a byte-code function object is like that for a vector, with an additional `#' before the opening `['. -- Kevin Rodgers Denver, Colorado, USA