branch: elpa/yaml-mode commit f49fb81a838c3f4471a5310d12752875336d2e5a Author: Ville Skyttä <ville.sky...@iki.fi> Commit: Ville Skyttä <ville.sky...@iki.fi>
Add magic-mode-list entry https://yaml.org/spec/1.2/spec.html#ns-yaml-directive --- yaml-mode.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yaml-mode.el b/yaml-mode.el index 91db316..9d619d5 100644 --- a/yaml-mode.el +++ b/yaml-mode.el @@ -484,6 +484,10 @@ this will do usual adaptive fill behaviors." ;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(e?ya?\\|ra\\)ml\\'" . yaml-mode)) +;;;###autoload +(add-to-list 'magic-mode-alist + '("^%YAML\\s-+[0-9]+\\.[0-9]+\\(\\s-+#\\|\\s-*$\\)" . yaml-mode)) + (provide 'yaml-mode) ;;; yaml-mode.el ends here