Fix emacs

fix three tiny but quite annoying bugs in the elisp code