Julien Cubizolles <j.cubizol...@free.fr> writes: > I tried the following: > --8<---------------cut here---------------start------------->8--- > (eval-after-load 'ox-latex > (progn '(add-to-list 'org-latex-classes > '("mpsi_beamer" "\\documentclass{mpsi_beamer}\n > [NO-DEFAULT-PACKAGES]" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\\subsubsection*{%s}") > )) > '(add-to-list 'org-latex-classes > '("mpsi" "\\documentclass[cours,Version,colonne]{mpsi}" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > )) > )) > --8<---------------cut here---------------end--------------->8--- > > but only the second one (mpsi) is loaded.
that's because your (progn) is unquoted and thus evaluated at the same time as eval-after-load, i.e. it returns its last value (which is the second add-to-list form) and that is what is being added to the eval-after-load list. What you want is the whole (progn) added there, so an easy fix probably is to say '(progn ...) *and* remove the quotes around the calls to add-to-list. -- Nico.