Re: Overwriting definitions with tm-define

Massimiliano Gubinelli <[email protected]>
Newsgroups gmane.editors.texmacs.devel
Message-ID <[email protected]>
In particular, it is already defined in the CPP glue code. See src/Scheme/Glue/glue_basic.cpp


> On 24. Dec 2020, at 12:13, Massimiliano Gubinelli <[email protected]> wrote:
> 
> Hi Giovanni,
> very likely "translate" is already defined otherwise and overloading it with different number of parameters is not possible.
> 
> I think this speaks for a request I was making to Joris, that is to distinguish the *definition* of a new overloadable function and its *overloading*. Both operation are currently handled by tm-define but from my point of view this is not very nice. Especially because the tm-defined functions are by default imported in all texmacs modules.
> 
> Max
> 
> 
> 
>> On 23. Dec 2020, at 23:36, Giovanni Piredda <[email protected]> wrote:
>> 
>> Dear developers - dear all,
>> 
>> I have noticed that trying to redefine with tm-define the procedure "translate" gets TeXmacs in a non-recoverable state. I found it out as I wanted to call "translate" a graphical procedure.
>> 
>> One error message is
>> 
>> Guile error: ((wrong-number-of-args #f Wrong number of arguments to ~A (#<procedure translate (a b c)>) #f))
>> .../TeXmacs/progs/kernel/boot/debug.scm:231:19: In procedure throw in expression (apply throw err):
>> .../TeXmacs/progs/kernel/boot/debug.scm:231:19: Wrong number of arguments to #<procedure translate (a b c)>
>> 
>> and "native menubar trick" appears in the menus.
>> 
>> Is this expected? I tried to redefine tr-file and this on the opposite is possible.
>> 
>> I am going to call the procedure for translation "shift", so I do not need the redefinition of "translate" to work, but I am curious.
>> 
>> Giovanni
>> 
>> 
>> _______________________________________________
>> Texmacs-dev mailing list
>> [email protected]
>> https://lists.gnu.org/mailman/listinfo/texmacs-dev
> 


_______________________________________________
Texmacs-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.