I just installed Emacs 24.4 from source (on Ubuntu 14.04). I now get the following error when running Emacs:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("/[._]emacs\\.d/?\\'" nil nil)
command-line()
normal-top-level()
For debugging, I reduced my ~/.emacs init file to:
(setq debug-on-error t)
(add-to-list 'load-path nil)
Then the error occurs only when starting Emacs with two arguments, where the first argument is an option, for example --no-splash, and the second argument is a file name with a suffix, for example a.txt. Some other observations:
If I remove the option (--no-splash) it works fine,
if I remove the line (add-to-list 'load-path nil) it works fine,
if I run with Emacs v. 24.3 it works fine,
if I change nil to ".", in ~/.emacs it works fine,
if I remove the suffix from the file name, that is: changing a.txt to a, I get another error: Args out of range: 0.
I built Emacs 24.4.1 from source, using with `--with-xft` option to configure.