# HG changeset patch # User Franz Glasner # Date 1557097663 -7200 # Node ID fa660f084ceb240e29f1039bb5f0c3a8b654ea09 # Parent c8d071581a4c068d9d605863e2ce47bc72fe1cc2 Docu: an example for configmix.try_determine_filemode() diff -r c8d071581a4c -r fa660f084ceb doc/introduction.rst --- a/doc/introduction.rst Sun May 05 18:47:12 2019 +0200 +++ b/doc/introduction.rst Mon May 06 01:07:43 2019 +0200 @@ -395,3 +395,8 @@ If :py:func:`~configmix.clear_assoc` will not be called then just a *new* configuration file style will be installed. + + To select the loader not by extension but by an Emacs-compatible mode + declaration (e.g. ``mode: yaml``) in the first two lines of a file use:: + + configmix.set_assoc("*", configmix.try_determine_filemode)