title: Elisp use apply on progn for list of functions
body: <p>I am a new emacs user. And trying to write some Elisp to learn this software better. While I meet some problems.</p>
  
  <p>I want to use <code>apply</code> on <code>progn</code> to run a list of functions in sequence. But I got errors as below. I am just confused and need some help to tell me how to achieve this in Elisp, thanks. </p>
  
  <pre class="lang-lisp prettyprint-override"><code>(progn
    (+ 1 1)
    (+ 2 2)
    )
  ;; =&gt; 4
  
  (apply #'progn ((+ 1 1) (+ 2 2)))
  ;; =&gt; Invalid function: (+ 1 1)
  
  (apply #'progn ('(+ 1 1) '(+ 2 2)))
  ;; =&gt; Invalid function: '(+ 1 1)
  
  (apply #'progn '((+ 1 1) (+ 2 2)))
  ;; =&gt; Invalid function: #&lt;subr progn&gt;
  </code></pre>
  
  <p>I toy play as above cause I come to emacs from vim. So I installed evil and evil number. And want back the vim number inc and dec bindings C-a, C-x. So I write a macro as blow to avoid boilerplate.</p>
  
  <pre class="lang-lisp prettyprint-override"><code>(defmacro set-evil-number-keymap (key-set func &amp;rest modes)
    `(apply 'progn
           ,(-map
            (lambda (mode)
              `(define-key ,(intern (concat "evil-" mode "-state-map")) (kbd ,key-set)
                ',(intern
                   (concat "evil-numbers/" func))))
            ,modes)))
  
  (set-evil-number-keymap "C-a" "inc-at-pt" "normal" "insert")
  (set-evil-number-keymap "C-x" "dec-at-pt" "normal" "insert")
  </code></pre>
  
  <p>My expectation is something below. While it just not run.</p>
  
  <pre class="lang-lisp prettyprint-override"><code>
  (progn 
  (define-key evil-normal-state-map (kbd "C-a") ’evil-numbers/inc-at-pt) (define-key evil-visual-state-map (kbd "C-a") ’evil-numbers/inc-at-pt))
  
  (progn 
  (define-key evil-normal-state-map (kbd "C-x") ’evil-numbers/dec-at-pt) (define-key evil-visual-state-map (kbd "C-x") ’evil-numbers/dec-at-pt))
  
  
  </code></pre>