Mercurial > hgrepos > Python > libs > ConfigMix
changeset 210:fa660f084ceb
Docu: an example for configmix.try_determine_filemode()
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 06 May 2019 01:07:43 +0200 |
| parents | c8d071581a4c |
| children | 657cf709463b |
| files | doc/introduction.rst |
| diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)
