From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MON KEY Newsgroups: gmane.emacs.devel Subject: Re: symbol equality --cl-rest-- help-function-arglist member vs member* and also equal, eql, and eq Date: Tue, 22 Dec 2009 18:57:38 -0500 Message-ID: References: <877hsfiw8m.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1261526287 25075 80.91.229.12 (22 Dec 2009 23:58:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Dec 2009 23:58:07 +0000 (UTC) Cc: stephen@xemacs.org, miles@gnu.org To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 23 00:58:00 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NNEc3-0007Jh-OF for ged-emacs-devel@m.gmane.org; Wed, 23 Dec 2009 00:58:00 +0100 Original-Received: from localhost ([127.0.0.1]:51682 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNEc3-00035O-Kw for ged-emacs-devel@m.gmane.org; Tue, 22 Dec 2009 18:57:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NNEbx-00034Q-D8 for emacs-devel@gnu.org; Tue, 22 Dec 2009 18:57:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NNEbr-0002vo-O6 for emacs-devel@gnu.org; Tue, 22 Dec 2009 18:57:51 -0500 Original-Received: from [199.232.76.173] (port=51692 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNEbr-0002vT-Gg for emacs-devel@gnu.org; Tue, 22 Dec 2009 18:57:47 -0500 Original-Received: from mail-gx0-f224.google.com ([209.85.217.224]:42064) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NNEbm-0003DL-DK; Tue, 22 Dec 2009 18:57:42 -0500 Original-Received: by gxk24 with SMTP id 24so5574985gxk.6 for ; Tue, 22 Dec 2009 15:57:39 -0800 (PST) Original-Received: by 10.151.18.40 with SMTP id v40mr14809054ybi.11.1261526258985; Tue, 22 Dec 2009 15:57:38 -0800 (PST) In-Reply-To: <877hsfiw8m.fsf@catnip.gol.com> X-Google-Sender-Auth: 17c1f51c5d2190a5 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118780 Archived-At: Stephen > Apparently --cl-rest-- is an uninterned symbol. This is done so that > the symbol cannot shadow an definition in code outside the cl-arglist > processing module. Miles > It looks like `--cl-rest--' is an uninterned symbol. > This is a good thing. Ok, thanks to you both for explaining. However, I'm not able to make that to jibe... still missing something I'm sure. I understand why there needs to be a reserved 'anonymous' symbol for the --rest-of-cl-- e.g. --cl-rest-- and that this symbol should remain uninterned but what I am missing on is why --cl-keys-- is converted to `cl-keys' whereas --cl-rest-- can't/isn't in the `cl-do-arglist' function? For example, In the following both `body' and `--cl-rest--' show as being interned whereas the `*-wombats' aren't: (intern-soft "body") ;=> t (intern-soft "--cl-rest--") ;=> t (intern-soft "scary-flying-wombats") ;=> nil (mapatoms (lambda (x) (when (string= (symbol-name x) ;; "body") ;=> (found body) ;; "--cl-rest--") ;=> (found --cl-rest--) "scary-flying-wombats") ;=> nil (prin1 `(found ,x)))) obarray) (intern-soft "more-wombats") ;=> nil (make-symbol "more-wombats") ;=> more-wombats (mapatoms (lambda (x) (when (string= (symbol-name x) "more-wombats") (prin1 `(found ,x)))) obarray) ;=> nil (member 'cl-keys (help-function-arglist 'reduce)) ;=> (cl-keys) (member 'body (help-function-arglist 'unless)) ;=> (body) (BTW Everything above was evaluated on two systems and with `emacs -Q'. With the same results.) Is not the the now-maybe arg/keyword acting acting in a manner similar to &key's --cl-keys--, e.g. it is let bound not setq'd: (defun* 3rd-degree (q z w &key now-maybe) (let ((3d (make-symbol "now-maybe"))) (when now-maybe 3d))) (help-function-arglist '3rd-degree) ;=> (q z w &rest --cl-rest--) (member 'now-maybe (help-function-arglist '3rd-degree)) ;=> nil (intern-soft "now-maybe") ;=> now-maybe (mapatoms (lambda (x) (when (string= (symbol-name x) "now-maybe") (prin1 `(found ,x)))) obarray) ;=> (found now-maybe) IOW `now-maybe' is interned directly via the let form whereas `--cl-rest--' appears to be indirected through let via restarg in `cl-do-arglist' e.g. (setq restarg (make-symbol "--cl-rest--") I'm _not_ advocating a change but it would be good to understand vis a vis Miles' admonition: "That is a good thing." What would be the consequences if user level keys following &rest i.e. :mon-key0 :mon-key1 :mon-key2 _were_ to be interned directly (maybe on a partitioned obarray) instead of passing the buck to --cl-rest--? Again, asked out of curiosity :) s_P