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://golang.org/cl/20100043
1 file changed