src/Pure/tactic.ML
changeset 13559 51c3ac47d127
parent 13105 3d1e7a199bdc
child 13650 31bd2a8cdbe2
equal deleted inserted replaced
13558:18acbbd4d225 13559:51c3ac47d127
   558      separated by blanks ***)
   558      separated by blanks ***)
   559 
   559 
   560 (*Calling this will generate the warning "Same as previous level" since
   560 (*Calling this will generate the warning "Same as previous level" since
   561   it affects nothing but the names of bound variables!*)
   561   it affects nothing but the names of bound variables!*)
   562 fun rename_params_tac xs i =
   562 fun rename_params_tac xs i =
   563   (if !Logic.auto_rename
   563   case Library.find_first (not o Symbol.is_identifier) xs of
   564     then (warning "Resetting Logic.auto_rename";
   564       Some x => error ("Not an identifier: " ^ x)
   565         Logic.auto_rename := false)
   565     | None => 
   566    else (); PRIMITIVE (rename_params_rule (xs, i)));
   566        (if !Logic.auto_rename
       
   567 	 then (warning "Resetting Logic.auto_rename";
       
   568 	     Logic.auto_rename := false)
       
   569 	else (); PRIMITIVE (rename_params_rule (xs, i)));
   567 
   570 
   568 fun rename_tac str i =
   571 fun rename_tac str i =
   569   let val cs = Symbol.explode str in
   572   let val cs = Symbol.explode str in
   570   case #2 (take_prefix (Symbol.is_letdig orf Symbol.is_blank) cs) of
   573   case #2 (take_prefix (Symbol.is_letdig orf Symbol.is_blank) cs) of
   571       [] => rename_params_tac (scanwords Symbol.is_letdig cs) i
   574       [] => rename_params_tac (scanwords Symbol.is_letdig cs) i