Skip to content

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

@lua-vr

Description

@lua-vr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions