I'm having trouble autoloading mercurial.el. I'm using: (autoload 'hg-mode "mercurial" "HG mode." t) I suspect the problem may be because in mercurial.el there is both a variable called 'hg-mode' and a function called 'hg-mode'. Don't know really - I'm no elisp expert. Seems M-x hg-mode gives: execute-extended-command: Wrong type argument: commandp, hg-mode