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

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

Re: Strange behavior with major mode specific key bindings


From: Tim Johnson
Subject: Re: Strange behavior with major mode specific key bindings
Date: Fri, 24 Apr 2020 14:57:42 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1

On 4/24/20 2:36 PM, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
Tim Johnson wrote:

(defun tj-jinja2-mode-keys ()
   "Bindings and for jinja2"
   (define-prefix-command 'jinja2-mode-map)
   (local-set-key (kbd "C-c") 'jinja2-mode-map)
   (define-key jinja2-mode-map "a" 'jinja2-close-tag))
... why is it called the same thing? :O

And why set locally for a mode?

And isnt' C-c already a prefix command?

???

This works for me. Just change the Gnus map for the
real, intended, unquoted keymap, and change
the function.
I followed your pattern and it works. Thank you very much.
Doesn't that work, no hook needed?
Hook **is** needed, else another function is executed with  "c-c a"

   (define-key gnus-group-mode-map "\C-ca" 
#'gnus-group-unsubscribe-current-group)

Good work, quick reply. Much gratitude.

cheers


--
Tim
tj49.com




reply via email to

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