From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nic Ferrier Newsgroups: gmane.emacs.devel Subject: Re: adding namespaces to emacs-lisp (better elisp?) Date: Sat, 27 Jul 2013 09:27:55 +0100 Message-ID: <877ggc1k6s.fsf@ferrier.me.uk> References: <874nbh2z3y.fsf@ferrier.me.uk> <871u6l2ral.fsf@ferrier.me.uk> <87siz116zo.fsf@ferrier.me.uk> <87mwp90zgi.fsf@ferrier.me.uk> <87d2q50x58.fsf@ferrier.me.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374913688 28510 80.91.229.3 (27 Jul 2013 08:28:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Jul 2013 08:28:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 27 10:28:06 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V2zrB-0007P3-Ie for ged-emacs-devel@m.gmane.org; Sat, 27 Jul 2013 10:28:05 +0200 Original-Received: from localhost ([::1]:58317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2zrB-0001mY-4J for ged-emacs-devel@m.gmane.org; Sat, 27 Jul 2013 04:28:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2zr6-0001mF-LD for emacs-devel@gnu.org; Sat, 27 Jul 2013 04:28:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2zr4-0006Ce-3P for emacs-devel@gnu.org; Sat, 27 Jul 2013 04:28:00 -0400 Original-Received: from static.17.66.46.78.clients.your-server.de ([78.46.66.17]:50017 helo=po1.ferrier.me.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2zr3-0006CW-Tq for emacs-devel@gnu.org; Sat, 27 Jul 2013 04:27:58 -0400 Original-Received: from nferrier-Dell-System-XPS-L322X (140.35.155.90.in-addr.arpa [90.155.35.140]) by po1.ferrier.me.uk (Postfix) with ESMTP id A9E1FAC00BE; Sat, 27 Jul 2013 10:31:12 +0200 (CEST) Original-Received: from nics-xps (localhost [127.0.0.1]) by nferrier-Dell-System-XPS-L322X (Postfix) with ESMTP id 57B718C0409; Sat, 27 Jul 2013 09:27:55 +0100 (BST) In-Reply-To: (Stefan Monnier's message of "Fri, 26 Jul 2013 20:51:18 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 78.46.66.17 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162192 Archived-At: Stefan Monnier writes: >>>> If a namespace package calls intern the symbol is interned in the >>>> private obarray. >>> I'm not sure how you could do that and neither am I sure that would >>> preserve backward compatibility. So without more details of how that >>> would work, it sounds like wishful thinking to me. >> This is the core of my proposal. >> The guts of intern need to be altered to be aware of when it is being >> called in a packaged context. I am currently expecting to be able to do >> this with a file local variable. > > That's easy when the reader calls `intern', but I'm talking about when > the Elisp code itself makes calls to `intern'. I don't understand what would be different for my implementation strategy. When intern is called directly as a function the evaluator still knows about file local variables and so can detect whether it is in a package or not. What am I missing? This is the crucial part really. It's why I thought it would be achievable, because a package could just be a special file local variable (that *is* similar to CL's system). Nic