From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MON KEY Newsgroups: gmane.emacs.bugs Subject: bug#6497: 6497 Date: Thu, 1 Jul 2010 20:13:18 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1278030585 12183 80.91.229.12 (2 Jul 2010 00:29:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 2 Jul 2010 00:29:45 +0000 (UTC) Cc: 6497@debbugs.gnu.org To: Geoff Gole Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 02 02:29:42 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 1OUU8U-0000WW-BA for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Jul 2010 02:29:42 +0200 Original-Received: from localhost ([127.0.0.1]:44060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUU8T-00010M-Jv for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Jul 2010 20:29:41 -0400 Original-Received: from [140.186.70.92] (port=50941 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUU8L-000107-6I for bug-gnu-emacs@gnu.org; Thu, 01 Jul 2010 20:29:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUU8J-0004vD-VK for bug-gnu-emacs@gnu.org; Thu, 01 Jul 2010 20:29:33 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55724) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUU8J-0004v9-Tl for bug-gnu-emacs@gnu.org; Thu, 01 Jul 2010 20:29:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OUU14-0007kW-B0; Thu, 01 Jul 2010 20:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: MON KEY Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Jul 2010 00:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6497 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6497-submit@debbugs.gnu.org id=B6497.127803007129779 (code B ref 6497); Fri, 02 Jul 2010 00:22:02 +0000 Original-Received: (at 6497) by debbugs.gnu.org; 2 Jul 2010 00:21:11 +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 1OUU0E-0007kG-S2 for submit@debbugs.gnu.org; Thu, 01 Jul 2010 20:21:11 -0400 Original-Received: from mail-gy0-f172.google.com ([209.85.160.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUU0C-0007kB-Am for 6497@debbugs.gnu.org; Thu, 01 Jul 2010 20:21:08 -0400 Original-Received: by gyh3 with SMTP id 3so1395260gyh.3 for <6497@debbugs.gnu.org>; Thu, 01 Jul 2010 17:21:04 -0700 (PDT) Original-Received: by 10.101.26.33 with SMTP id d33mr285355anj.140.1278029598595; Thu, 01 Jul 2010 17:13:18 -0700 (PDT) Original-Received: by 10.151.46.4 with HTTP; Thu, 1 Jul 2010 17:13:18 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: R8lqWimk1z25A7-Zw7Wte6cs488 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 01 Jul 2010 20:22: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:38189 Archived-At: On Thu, Jul 1, 2010 at 5:20 AM, Geoff Gole wrote: > Given the similarity of docstrings for `indirect-variable' and > `indirect-function' it is possible for a user to assume the quoting > rules of `indirect-variable' apply as well to `indirect-function'. >> There are no "quoting rules" for indirect-variable or When given an unquoted symbol as its argument `indirect-variable' will return the value of a non-null symbol. That it does so represents a subtle alteration of the generally expected semantics e.g. wheras `indirect-function' does signal an error. >> indirect-function. They are regular functions and have the same >> argument evaluation semantics as every other regular function. Neither are regular lisp functions they are both primitives defined in src/data.c (symbol-function 'indirect-function) (symbol-function 'indirect-variable) > More troublesome though is that neither `indirect-function' nor > `symbol-function' document their return values in any meaningful way: >> They mention that they return a "function definition", Except, that they don't always. which the docstring is in error. >> which is appropriately abstract Appropriately abstract for whom? >> given that these functions don't depend in any way on the details >> of function representation. Sure they rely on the details of the function representation: (symbol-function 'not-a-real-function) => (void-function not-a-real-function) (symbol-functiol not-a-real-function) => (void-function symbol-functiol) (symbol-function indirect-function) => (void-variable indirect-function) ;; <-- void-variable (indirect-function 'not-a-real-function) => (void-function not-a-real-function) (indirect-function not-a-real-function) => (void-variable not-a-real-function) ;; <-- void-variable (indirect-function symbol-function) => (void-variable symbol-function) ;; <-- void-variable How do these primitives reach determination that the function cell of `not-a-real-function' is void if they don't access som portion of the representation denoting that symbol is function/variable? >> Function values are already documented in detail elsewhere, and In detail and across a wide range. e.g.: - See bug#6496 re autoload objects not appearing in "What is a function" node in manual. - See bug#6486 re `byte-code-function-p' requiring the user to cross reference 3x info nodes in order to conclude that its return value is as per `symbol-function'. >> duplicating that documentation would not be helpful. Would not be helful for whom? `symbol-function' and `indirect-function' are the cannonical interfaces by which one can access the function cell of a symbol. The docstring of `symbol-function' is a terse one sentence and doesn't provide any indication that the _readability_ of its return value varies significantly acording to the type of function given as the arugment. Really, symbol-function and his buddy `indirect-function' return: - a lambda form - a vector - a list - a cons - and two types of unreadable objects I would suggest this is is abnormal compared w/ the vast majority of Emacs lisp functions' return values. -- /s_P\