Method code for $foundation.set_msg_attr()

[Turn off line numbering]
  1: arg name, attr, value;
  2: var attrs;
  3: 
  4: (> .perms(sender()) <);
  5: if (!defined_msgs || !dict_contains(defined_msgs, name))
  6:     throw(~msgnf, "Message \"" + name + "\" is not defined on " + this());
  7: if (attr == 'branches)
  8:     [attrs, value] = (> ._parse_msg_branches(name, attr, value) <);
  9: else
 10:     attrs = defined_msgs[name];
 11: if (!value)
 12:     attrs = dict_del(attrs, attr);
 13: else
 14:     attrs = dict_add(attrs, attr, value);
 15: defined_msgs = dict_add(defined_msgs, name, attrs);

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon