Redefine a function

Found this site on the web —>
I downloaded the tarball with his configuration and tested it (i miss a few of the programs that he use, i will emerge them as soon as my emerge --world is done)

Anyway - one of thoose things i don’t realy get in his config is this :

AddToFunc RedefineFunc
+ I DestroyFunc $0
+ I AddToFunc $*

RedefineFunc StartFunction
some stuff
and some more stuff

All the functions in his code is then of the ‘type’(?) RedefinFunc
Is there any use do so, or just udd behavior and a waste of resources?


Type? No – FVWM isn’t a language or anything like that. It’s certainly not a “type” of anything. All that is happening is the function RedefineFunc accepts one argument as the name of the function, and the for anything else pointed to it, is added to the function.

To be honest, it’s an utter waste of time, and does nothing more than save you one line of typing. (Not to mention having the extra memory around for defining the RedefineFunc in the first place). Scott Smedley on the FVWM-Workers mailing list has already proposed a “RedefineFunc” keyword to do just as this guy is doing here. Until then, the separation of using DestroyFunc and AddToFunc as a couplet is the better way to go.

– Thomas Adam