[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65895: 29.1; Cannot assign keys to c++-ts-mode-map
From: |
Eli Zaretskii |
Subject: |
bug#65895: 29.1; Cannot assign keys to c++-ts-mode-map |
Date: |
Sun, 17 Sep 2023 12:59:25 +0300 |
> Cc: 65895@debbugs.gnu.org
> Date: Tue, 12 Sep 2023 21:46:12 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> > Date: Tue, 12 Sep 2023 17:00:06 +0000
> > From: Mikael Springer via "Bug reports for GNU Emacs,
> > the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> >
> >
> >
> > In my init file I try to assign keys to c++-ts-mode's keymap without
> > success. I try two different ways, the first is using use-package and
> > the second eval-after-load and define-key, neither of them work. I
> > list them both below;
> >
> > (use-package c++-ts-mode
> > :ensure nil
> > :bind
> > (:map c++-ts-mode-map
> > ("M-<up>" . treesit-beginning-of-defun)
> > ("M-<down>" . treesit-end-of-defun))
> > :hook (c++-ts-mode . ms-treesit-set-cpp-style))
> >
> > (eval-after-load 'c++-ts-mode
> > '(progn
> > (define-key c++-ts-mode-map (kbd "M-<up>") 'treesit-beginning-of-defun)
> > (define-key c++-ts-mode-map (kbd "M-<down>") 'treesit-end-of-defun)))
> >
> > I'm certain c++-ts-mode is loaded, I have verified this with
> > (eval-expression major-mode). I notice when I look in the code in
> > c-ts-mode.el that c++-ts-mode-map is never created with a defvar-keymap
> > statement, only c-ts-base-mode-map is.
>
> Thanks, should be fixed now on the emacs-29 branch.
No further comments, so I presume the bug was indeed fixed, and I'm
closing it.