[gnu.emacs] Binding directly to functions.

peterw@blia.BLI.COM (Peter Wisnovsky) (12/05/89)

I have been trying to bind a set of keys to functions without sucess:
I have been trying something like

(define-key nroff-mode-map "\C-cb" '(lambda () (quote-sexp "\fB" "\fI")))

but this always yields an error when I try to execute it. Can someone
with an elisp manual help me out?

gaynor@outlaws.rutgers.edu (Silver) (12/06/89)

peterw@blia.BLI.COM writes:
> [What's wrong with this picture?]
> (define-key nroff-mode-map "\C-cb" '(lambda () (quote-sexp "\fB" "\fI")))

Try something like this:

  (define-key nroff-mode-map "\C-cb" '(lambda () (interactive)
                                                 (quote-sexp "\fB" "\fI")))

Regards, [Ag] gaynor@topaz.rutgers.edu