anchor.diff:         encode_msg,
          fun(Msg, '<MsgName>', '<Opts>') ->
                  '<possibly-verify-msg>',
  +               'TrUserData = proplists:get_value(user_data, Opts)',
                  case '<MsgOrMsgName>' of
  -                   '<msg-match>' -> 'encode'(Msg)
  +                   '<msg-match>' -> 'encode'(Msg, 'TrUserData')
                  end
          end,
  -       [replace_tree('<Opts>', case Verify of
  -                                   optionally -> ?expr(Opts);
  -                                   always     -> ?expr(_Opts);
  -                                   never      -> ?expr(_Opts)
  +       [replace_tree('<Opts>', case {DoNif, Verify} of
  +                                   {true,optionally} -> ?expr(Opts);
  +                                   {true,always}     -> ?expr(_Opts);
  +                                   {true,never}      -> ?expr(_Opts);
  +                                   {false,_}         -> ?expr(Opts)
                                  end),
           splice_trees('<possibly-verify-msg>',
                        case Verify of
  
positive.code:               erlang:nif_error({error,{nif_not_loaded,'<msg-name>'}}, [Msg])
        end,
        [replace_term('<msg-name>', MsgName)]).
  
  %% -- decoders -----------------------------------------------------
  
  
negative.code:                                            records -> ?expr(Msg);
                                             maps    -> ?expr(MsgName)
                                         end),
          splice_trees('<MsgName>', MsgNameVars),
          splice_trees('TrUserData', if DoNif -> [];
                                        true  -> [?expr(TrUserData)]
                                     end)])].
  
  format_aux_encoders(Defs, AnRes, _Opts) ->
      [format_enum_encoders(Defs, AnRes),
  