To break the above macro down, as I understand, for clarity:

/merror off - turns off any macro based errors in chat log only (Not on screen!)

/chotbar pet "Action" "Pet Name" # LA# - "/chotbar" or "/hotbar", depending on your setup, is your primary macro action. "Pet" identifies the following action as that of your pet. "Pet Name" must follow the action, to tell the system which pet it's assigned to.

/ac "Action" - Casts your preferred summon action.

/wait # - This allows for the cast time of the summon, before issuing the final command.

/pac "Obey" <me> - Brings the pet out of Free Mode, which they always seem to summon in as for me.

/micon "Action" - Helpful to use the same action here, as the original, to help easily identify in the hotbar.