Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yas-activate-extra-mode does not update keybindings #1110

Open
sophicshift opened this issue Jul 14, 2021 · 0 comments
Open

yas-activate-extra-mode does not update keybindings #1110

sophicshift opened this issue Jul 14, 2021 · 0 comments

Comments

@sophicshift
Copy link

sophicshift commented Jul 14, 2021

It seems (after some tests and comparing the yas-activate-extra-mode and yas-minor-mode code) that yas-activate-extra-mode does not activate the extra mode snippet's keybindings when they exist.

The missing bit from yas-minor-mode that make bindings work is:

         ;; Set the `yas--direct-%s' vars for direct keymap expansion
         ;;
         (dolist (mode (yas--modes-to-activate))
           (let ((name (intern (format "yas--direct-%s" mode))))
             (set-default name nil)
             (set (make-local-variable name) t)))

and indeed, if I append

(let ((name (intern (format "yas--direct-%s" mode))))
  (set-default name nil)
  (set (make-local-variable name) t))

to the yas-activate-extra-mode function, keybindings are loaded as expected.

sophicshift added a commit to sophicshift/yasnippet that referenced this issue Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant