branch: elpa/yaml-mode
commit 63b637f846411806ae47e63adc06fe9427be1131
Merge: 3a57058 f49fb81
Author: Vasilij Schneidermann <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #88 from scop/feature/magic-mode-alist
Add magic-mode-list entry
---
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