mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-06 07:51:39 -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.
|
"If ARG is a completion with a snippet, expand the snippet.
|
||||||
Do this only if STATUS is sole or finished."
|
Do this only if STATUS is sole or finished."
|
||||||
(when (and (memq status '(sole finished))
|
(when (and (memq status '(sole finished))
|
||||||
(get-text-property 0 'snippet arg)
|
(get-text-property 0 'snippet arg))
|
||||||
(bound-and-true-p yas-minor-mode))
|
(when (and (require 'yasnippet nil t)
|
||||||
|
(not yas-minor-mode))
|
||||||
|
(yas-minor-mode 1))
|
||||||
(yas-expand-snippet
|
(yas-expand-snippet
|
||||||
(get-text-property 0 'snippet arg)
|
(get-text-property 0 'snippet arg)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
|
Loading…
Add table
Reference in a new issue