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: Emanuel Berg
Subject: Re: Strange behavior with major mode specific key bindings
Date: Sat, 25 Apr 2020 00:36:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

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.

Doesn't that work, no hook needed?

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

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

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