From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: SES local variables to define printers Date: Thu, 30 May 2013 09:20:13 -0400 Message-ID: References: <80ehcpnhin.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369920032 13363 80.91.229.3 (30 May 2013 13:20:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 May 2013 13:20:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: Vincent =?iso-8859-1?Q?Bela=EFche?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 30 15:20:31 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 1Ui2mM-0003ID-Jw for ged-emacs-devel@m.gmane.org; Thu, 30 May 2013 15:20:30 +0200 Original-Received: from localhost ([::1]:54429 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui2mL-0006S9-St for ged-emacs-devel@m.gmane.org; Thu, 30 May 2013 09:20:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui2mB-0006RS-N2 for emacs-devel@gnu.org; Thu, 30 May 2013 09:20:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ui2m6-0007Dm-Qh for emacs-devel@gnu.org; Thu, 30 May 2013 09:20:19 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:30957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui2m6-0007DP-LJ for emacs-devel@gnu.org; Thu, 30 May 2013 09:20:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpYtM/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFFpYtM/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="15182698" Original-Received: from 69-165-139-76.dsl.teksavvy.com (HELO pastel.home) ([69.165.139.76]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 May 2013 09:20:08 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 526E567B05; Thu, 30 May 2013 09:20:13 -0400 (EDT) In-Reply-To: <80ehcpnhin.fsf@gmail.com> ("Vincent =?iso-8859-1?Q?Bela=EFch?= =?iso-8859-1?Q?e=22's?= message of "Thu, 30 May 2013 07:50:08 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:159921 Archived-At: > Ok you means _after_ the ses-cell declaration, just before those general > declarations (taken from examples.ses): For example. I don't think it matters much whether they come after or before the ses-cell calls. > One more question: when you define a symbol as local (e.g. with > make-local-variable), does it mean only the value slot of the symbol is > made local, or do you have also the function slot made local. It only defines this dynamically-bound variable as buffer-local. The function is unaffected. > hand, I am not even sure that EMACS lisp allow to create file local > functions. Elisp doesn't have buffer-local functions, indeed. > What I could do if there is no such a thing as file local function is to > set the symbol value slot to some specific symbol, say :ses-printer, and > use the symbol name as a key to a hash map containing all local > printers. Actually, you don't need to use the symbol at all. In ses-cell, just check if the printer's name is found in your hash-map and if so, use the function you found there instead. This way, the user can give local names without having to worry about affecting other packages which might accidentally be using the same names. Stefan