diff -rc pine4.51/pine/folder.c pine4.51.expvar/pine/folder.c
*** pine4.51/pine/folder.c	Wed Nov 27 15:22:52 2002
--- pine4.51.expvar/pine/folder.c	Sat Dec 14 22:14:59 2002
***************
*** 4370,4376 ****
  
  	for(lp = new_list, i = 0; (*alval)[i]; i++){
  	  /* figure out if this is the one we're renaming */
! 	  expand_variables(tmp_20k_buf, (*alval)[i], 0);
  	  if(new_f->varhash == line_hash(tmp_20k_buf)){
  	      char *folder_string = NULL, *nickname = NULL;
  
--- 4370,4376 ----
  
  	for(lp = new_list, i = 0; (*alval)[i]; i++){
  	  /* figure out if this is the one we're renaming */
! 	  expand_variables(tmp_20k_buf, SIZEOF_20KBUF, (*alval)[i], 0);
  	  if(new_f->varhash == line_hash(tmp_20k_buf)){
  	      char *folder_string = NULL, *nickname = NULL;
  
***************
*** 4697,4703 ****
  	 * Copy while figuring out which one to skip.
  	 */
  	for(lp = new_list, i = 0; (*alval)[i]; i++){
! 	    expand_variables(tmp_20k_buf, (*alval)[i], 0);
  	    if(fp->varhash != line_hash(tmp_20k_buf))
  	      *lp++ = cpystr((*alval)[i]);
  	}
--- 4697,4703 ----
  	 * Copy while figuring out which one to skip.
  	 */
  	for(lp = new_list, i = 0; (*alval)[i]; i++){
! 	    expand_variables(tmp_20k_buf, SIZEOF_20KBUF, (*alval)[i], 0);
  	    if(fp->varhash != line_hash(tmp_20k_buf))
  	      *lp++ = cpystr((*alval)[i]);
  	}
***************
*** 4753,4759 ****
      /* is it in exceptions config? */
      if(v->post_user_val.l){
  	for(i = 0, t=v->post_user_val.l; t[i]; i++){
! 	    if(expand_variables(tmp_20k_buf, t[i], 0)){
  		keep_going = 0;
  
  		if(!strcmp(tmp_20k_buf, INHERIT))
--- 4753,4759 ----
      /* is it in exceptions config? */
      if(v->post_user_val.l){
  	for(i = 0, t=v->post_user_val.l; t[i]; i++){
! 	    if(expand_variables(tmp_20k_buf, SIZEOF_20KBUF, t[i], 0)){
  		keep_going = 0;
  
  		if(!strcmp(tmp_20k_buf, INHERIT))
***************
*** 4770,4776 ****
      /* is it in main config? */
      if(keep_going && v->main_user_val.l){
  	for(i = 0, t=v->main_user_val.l; t[i]; i++){
! 	    if(expand_variables(tmp_20k_buf, t[i], 0) &&
  	       folder->varhash == line_hash(tmp_20k_buf))
  	      return(Main);
  	}
--- 4770,4776 ----
      /* is it in main config? */
      if(keep_going && v->main_user_val.l){
  	for(i = 0, t=v->main_user_val.l; t[i]; i++){
! 	    if(expand_variables(tmp_20k_buf, SIZEOF_20KBUF, t[i], 0) &&
  	       folder->varhash == line_hash(tmp_20k_buf))
  	      return(Main);
  	}
***************
*** 7507,7513 ****
      /* find where this entry is in the particular config list */
      index_within_var = -1;
      for(i = 0; (*alval)[i]; i++){
! 	expand_variables(tmp_20k_buf, (*alval)[i], 0);
  	if(i == 0 && !strcmp(tmp_20k_buf, INHERIT))
  	  inheriting = 1;
  	else if(fp->varhash == line_hash(tmp_20k_buf)){
--- 7507,7513 ----
      /* find where this entry is in the particular config list */
      index_within_var = -1;
      for(i = 0; (*alval)[i]; i++){
! 	expand_variables(tmp_20k_buf, SIZEOF_20KBUF, (*alval)[i], 0);
  	if(i == 0 && !strcmp(tmp_20k_buf, INHERIT))
  	  inheriting = 1;
  	else if(fp->varhash == line_hash(tmp_20k_buf)){
