Re: Proposal for new/old macro implementation

2007-04-16 Thread Stefan Schimanski
Cleaned up the patch and changed some details: non-brace arguments are shifted now as well into macros. Schimmi dynamicmacros.patch Description: Binary data PGP.sig Description: Signierter Teil der Nachricht

Re: Proposal for new/old macro implementation

2007-04-16 Thread Andre Poenitz
On Mon, Apr 16, 2007 at 10:10:15PM +0200, Stefan Schimanski wrote: > Am 16.04.2007 um 20:35 schrieb Andre Poenitz: > >>>arises: How would that schem cope with 'unknown' > > An unknown macro is a macro of arity zero. > > >>>\a 12 > >>> > >>>unless you know whether \a is defined as \def\a#1#2{#1+#2

Re: Proposal for new/old macro implementation

2007-04-16 Thread Stefan Schimanski
Am 16.04.2007 um 20:35 schrieb Andre Poenitz: arises: How would that schem cope with 'unknown' An unknown macro is a macro of arity zero. \a 12 unless you know whether \a is defined as \def\a#1#2{#1+#2} or \def\a {x}? Well, my assumption is that every argument is a brace, like in \newcomma

Re: Proposal for new/old macro implementation

2007-04-16 Thread Andre Poenitz
On Mon, Apr 16, 2007 at 08:00:57PM +0200, Stefan Schimanski wrote: > >I haven't looked at the patch, just at this description here. A > >question > >arises: How would that schem cope with 'unknown' > > > >\a 12 > > > >unless you know whether \a is defined as \def\a#1#2{#1+#2} or \def\a > >{x}? >

Re: Proposal for new/old macro implementation

2007-04-16 Thread Stefan Schimanski
I haven't looked at the patch, just at this description here. A question arises: How would that schem cope with 'unknown' \a 12 unless you know whether \a is defined as \def\a#1#2{#1+#2} or \def\a {x}? Well, my assumption is that every argument is a brace, like in \newcommand{\foo}[n]{...

Re: Proposal for new/old macro implementation

2007-04-16 Thread Andre Poenitz
dim_.wid = 0; - Dimension d; - //BufferView & bv = *mi.base.bv; - //Buffer const & buf = *bv.buffer(); - for (size_t i = 0, n = size(); i != n; ++i) { + Dimension d; + for (size_t i = 0; i != size(); ++i) { What's wrong with the 'n'? +

Re: Proposal for new/old macro implementation

2007-04-16 Thread Andre Poenitz
On Mon, Apr 16, 2007 at 11:17:18AM +0200, Stefan Schimanski wrote: > Hi! > > I was investigating the macro system for the last days to find a way > to implement it in a cleaner way than it is at the moment. The main > well known problems with the current approach: > > 1. Macro definitions are

Proposal for new/old macro implementation

2007-04-16 Thread Stefan Schimanski
Hi! I was investigating the macro system for the last days to find a way to implement it in a cleaner way than it is at the moment. The main well known problems with the current approach: 1. Macro definitions are shared among all open document, i.e. one big global macro table 2. Macro ins