+ if (params().info().hasParam("literal")
+ && params()["literal"] == "true")
+ return;
+
+ ParamInfo::const_iterator it = params().info().begin();
+ ParamInfo::const_iterator end = params().info().end();
+ for (; it != end; ++it) {
+ if (it->handling() == ParamInfo::HANDLING_LATEXIFY) {
+ docstring const text = params()[it->name()];
+ // Validate the contents (if we LaTeXify, specific
+ // macros might require packages)
+ for (pos_type i = 0; i < int(text.size()) ; ++i)
+ BufferEncodings::validate(text[i], features);
+ }
+ }
+}
+
+
+void InsetCommand::changeCmdName(string const & new_name)
+{
+ string const & old_name = getCmdName();
+ if (old_name == new_name)
+ return;
+
+ if (buffer().masterParams().track_changes) {
+ // With change tracking, we insert a new inset and
+ // delete the old one
+ InsetCommandParams p(p_.code());
+ p = p_;
+ p.setCmdName(new_name);
+ string const data = InsetCommand::params2string(p);
+ lyx::dispatch(FuncRequest(LFUN_INSET_INSERT, data));
+ lyx::dispatch(FuncRequest(LFUN_CHAR_DELETE_FORWARD));
+ } else
+ p_.setCmdName(new_name);