misc/emacs: various cleanups

- Use #' for function symbols
- Remove unused variables
- Use declare-function to shut up byte compiler

This is identical to CL 19010044 with one exception: Making sure
it doesn't break on Emacs 22.1

R=adonovan, bradfitz, shendaras
CC=golang-dev
https://codereview.appspot.com/20100043

Committer: Alan Donovan <adonovan@google.com>