Originally Posted by
Steve.Sanderson(UK)
Like this?
Code:
^c^c-layer;a;s; (setq statename (getvar "Date"));c c;7;*;a;r; !statename;d; !statename;;;
TEXTEVAL is set to 0 by default (on my comp anyway), would it cause any problems to have it set to 1 permanantly? Or would it be better to include setting it to 1 and back to 0 in the macro (if it's even possible) ?
It is probably better programming to test for the value of TEXTEVAL, then force it to "1", then reset it to what you tested for. Like this:
Code:
(setq textevalval (getvar "Texteval"))
blah blah blah
(setvar "Texteval" textevalval)
(setq textevalval nil)
I set the variable back to nil as this is good practice, you should always clear your variables after you have finished with them. I didn't need to preceed the "textevalval" with an exclamation, as it is inside brackets and therefore being treated as raw Lisp.
You can certainly set TEXTEVAL to "1" permanently, I have it set that way and have no adverse effects. The only thing that can go wrong is if you need to enter some text that starts with a "!".