That's because it's inside a macro. A macro needs to return a Lisp form, which then in turn gets evaluated.
For example, looking at the first invocation of this macro:
(add-annoying-arrows-advice previous-line '(ace-jump-mode backward-paragraph isearch-backward ido-imenu smart-up))
We need the expansion to contain:
(put 'previous-line 'aa-alts '(ace-jump-mode backward-paragraph isearch-backward ido-imenu smart-up))
which is what (quote ,cmd)
achieves. If the macro would use plain cmd
instead, it would be kept literally and the expansion would be:
(put cmd 'aa-alts '(ace-jump-mode backward-paragraph isearch-backward ido-imenu smart-up))
which is an error, because cmd
is not defined in the environment where the macro is invoked.