* having trouble adding a key to an existing mode-map
@ 2013-12-18 17:31 gottlieb
2013-12-18 17:38 ` Jambunathan K
0 siblings, 1 reply; 4+ messages in thread
From: gottlieb @ 2013-12-18 17:31 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <mailman.9600.1387387898.10748.help-gnu-emacs@gnu.org>]
* Re: having trouble adding a key to an existing mode-map
[not found] <mailman.9600.1387387898.10748.help-gnu-emacs@gnu.org>
@ 2013-12-18 21:31 ` Emanuel Berg
0 siblings, 0 replies; 4+ messages in thread
From: Emanuel Berg @ 2013-12-18 21:31 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-18 21:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-18 17:31 having trouble adding a key to an existing mode-map gottlieb
2013-12-18 17:38 ` Jambunathan K
2013-12-18 17:51 ` Drew Adams
[not found] <mailman.9600.1387387898.10748.help-gnu-emacs@gnu.org>
2013-12-18 21:31 ` Emanuel Berg
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.