help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: having trouble adding a key to an existing mode-map


From: Emanuel Berg
Subject: Re: having trouble adding a key to an existing mode-map
Date: Wed, 18 Dec 2013 22:31:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

gottlieb@nyu.edu writes:

> My actual goal is to bind C-c t when in nroff mode to
> my command ajg-preview-troff.  To isolate any of my
> code I have tried
>
> emacs -Q -nw (require 'nroff-mode) (define-key
> nroff-mode-map "t" 'dired) nroff-mode-map
>
> The result is (keymap (116 . dired) ...)
>
> But 116 is not "t"; it is down.
>
> Where is my error?  thanks, allan
>

Just 't' or 'C-c t'? What I can see both works:

(require 'nroff-mode)
(define-key nroff-mode-map "t" (lambda () (interactive)
(message "t pressed")))
(define-key nroff-mode-map "\C-ct" (lambda () (interactive)
(message "C-c t pressed")))
(nroff-mode) ; then try t or C-c t

-- 
Emanuel Berg, programmer-for-rent. CV, projects, etc at uXu
underground experts united:  http://user.it.uu.se/~embe8573


reply via email to

[Prev in Thread] Current Thread [Next in Thread]