<<< Date Index >>>     <<< Thread Index >>>

correct usage of my_ vars



Hi, 

I have several spam reporting macros like this one:

        macro index,pager Se "<enter-command>set nocopy noautoedit nomime_fwd 
editor=/bin/true<enter><forward-message>spoof@xxxxxxxx<enter><kill-line>phishing
 attempt report<enter><send-message><delete-message><enter-command>set copy 
autoedit nomime_fwd editor=\"vim +'/^$'\"<enter>" "SPAM REPORT"

To avoid repeating the same 'set' and 'unset' commands for each macro I
thought about putting them in my_ variables:

        set my_begin_spamreport="<enter-command>set nocopy noautoedit 
nomime_fwd editor=/bin/true<enter><forward-message>"

        set my_end_spamreport="<enter><kill-line>phishing attempt 
report<enter><send-message><delete-message><enter-command>set copy autoedit 
nomime_fwd editor=\"vim +'/^$'\"<enter>"

The result is this shorter, more readable macro:

        macro index,pager Se "$my_begin_spamreport spoof@xxxxxxxx 
$my_end_spamreport" "SPAM REPORT"

The shortened macro seems to work well, however as this my first use of
my_ variables I thought I'd ask the list for a quick review of the above
for correctness.

Thanks,