mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
If no 'key' or 'binding' directives fall back to filename as trigger key
This commit is contained in:
parent
66e804dad0
commit
43232a10db
@ -1396,6 +1396,8 @@ Here's a list of currently recognized directives:
|
|||||||
(setq binding (match-string-no-properties 2)))))
|
(setq binding (match-string-no-properties 2)))))
|
||||||
(setq template
|
(setq template
|
||||||
(buffer-substring-no-properties (point-min) (point-max))))
|
(buffer-substring-no-properties (point-min) (point-max))))
|
||||||
|
(unless (or key binding)
|
||||||
|
(setq key (and file (file-name-nondirectory file))))
|
||||||
(when (eq type 'command)
|
(when (eq type 'command)
|
||||||
(setq template (yas/read-lisp (concat "(progn" template ")"))))
|
(setq template (yas/read-lisp (concat "(progn" template ")"))))
|
||||||
(when group
|
(when group
|
||||||
|
Loading…
x
Reference in New Issue
Block a user