Nicolas Goaziou <n.goaz...@gmail.com> writes: > Hello, > > Rasmus <ras...@gmx.us> writes: > >> Nicolas Goaziou <n.goaz...@gmail.com> writes: > >> is the attached patch better? > > It is, thank you. Here is another round of comments.
>> + (replace-match (mapconcat 'identity >> + (if language >> + (cond ((member language options) >> + (delete "AUTO") options) >> + ((member "AUTO" options) >> + (dotimes (n (length options) >> options) >> + (if (equal "AUTO" (nth n >> options)) >> + (setf (nth n options) >> language)))) >> + (t (append options (list >> language)))) >> + (delete "AUTO" options)) > > I suggest to use something like this instead: > > (mapconcat (lambda (option) (if (equal "AUTO" option) language option)) > (cond ((member language options) (delete "AUTO" options)) > ((member "AUTO" options) options) > (t (append options (list language))))) > >> - nil nil header 1)))))) >> + t nil header 1))))) It looks more elegant. I'll try to incorporate it and prepare a v4. > Why do you need to use a non-nil FIXEDCASE argument here? When I don't #+LANGUAGE: en #+LATEX_HEADER: \usepackage[AUTO]{babel} becomes \usepackage[ENGLISH]{babel}. . . Why? I don't know. . . Fixedcase solves it. -- Summon the Mothership!