mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 07:41:37 -05:00
Require yasnippet
automatically when a snippet can be expanded
This commit is contained in:
parent
c070f2d04d
commit
65dc7796ed
1 changed files with 4 additions and 2 deletions
|
@ -1842,8 +1842,10 @@ Run FUN when the completions are available."
|
|||
"If ARG is a completion with a snippet, expand the snippet.
|
||||
Do this only if STATUS is sole or finished."
|
||||
(when (and (memq status '(sole finished))
|
||||
(get-text-property 0 'snippet arg)
|
||||
(bound-and-true-p yas-minor-mode))
|
||||
(get-text-property 0 'snippet arg))
|
||||
(when (and (require 'yasnippet nil t)
|
||||
(not yas-minor-mode))
|
||||
(yas-minor-mode 1))
|
||||
(yas-expand-snippet
|
||||
(get-text-property 0 'snippet arg)
|
||||
(save-excursion
|
||||
|
|
Loading…
Add table
Reference in a new issue