emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SES local variables to define printers


From: Stefan Monnier
Subject: Re: SES local variables to define printers
Date: Thu, 30 May 2013 09:20:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]