Subject: bug#15389: 24.2.91; order of eval-after-load actions

From: [email-masked] (João Távora)
Date: Sun, 15 Sep 2013 23:41:01 +0100

Hi maintainers,

Consider a file foo-test.el consisting of this content

    (eval-after-load 'foo
      `(progn
         (message "foo1")))
     
    (eval-after-load 'foo
      `(progn
         (message "foo2")))
     
    (provide 'foo) 

If I interactively eval these forms in order using `eval-last-sexp', for
example I get

    foo1
    foo2

in the *Messages* buffer. But if i load the file like so

    emacs -Q --batch -l foo-test.el

I get

    foo2
    foo1

Is this the expected behaviour? Shouldn't the order in which the hooks
are run match the order of definition. 

In GNU Emacs 24.2.91.1 (x86_64-apple-darwin11.4.2, Carbon Version 1.6.0 AppKit 1138.51)
 of 2012-12-25 on king
Windowing system distributor `Apple Inc.', version 10.7.5
Configured using:
 `configure '--prefix=/usr/local/Cellar/emacs-mac/HEAD'
 '--enable-locallisppath=/usr/local/share/emacs/site-lisp'
 '--infodir=/usr/local/Cellar/emacs-mac/HEAD/share/info/emacs'
 '--with-mac' '--enable-mac-app' 'CC=cc''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t