[Top][All Lists]

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

RE: SES local variables to define printers

From: Vincent Belaïche
Subject: RE: SES local variables to define printers
Date: Thu, 30 May 2013 17:36:12 +0200

> From: address@hidden
> To: address@hidden
> CC: address@hidden
> Subject: Re: SES local variables to define printers
> Date: Thu, 30 May 2013 09:20:13 -0400
> > 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.

I think it does if ses counts lines to access the ses-cell rows --- TBC.


> Elisp doesn't have buffer-local functions, indeed.

OK, good to know...


> Actually, you don't need to use the symbol at all.

I need the symbol, because for instance if the symbol is ses-dashfill or
math-format-value, then I would directly call the corresponding
symbol-function rather than indexing the hash map.

So I need some trick to know whether the symbol is a function name or a
printer function. One simple trick would be to set the symbol value slot
to some fixed value, e.g. to symbol :ses-printer. Another way would be
to try the hash-map first and then check whether it is a function as a
fallback, or the other way round. I could also set some property to the

My preference would be to set the symbol value to some specific
indicator, I feel that the execution time would be faster this way. 

But maybe I should not care too much about this: one could improve speed
by caching all printer functions directly in the cell object for faster
access, and keeping printer definitions in a cell property.

> 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]