GNU bug report logs -
#65895
29.1; Cannot assign keys to c++-ts-mode-map
Previous Next
Full log
Message #15 received at 65895-done <at> debbugs.gnu.org (full text, mbox):
> Cc: 65895 <at> debbugs.gnu.org
> Date: Tue, 12 Sep 2023 21:46:12 +0300
> From: Eli Zaretskii <eliz <at> 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 <at> 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.
This bug report was last modified 1 year and 303 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.