branch: scratch/editorconfig-cc commit 9d364c80593d4c1a735f9ad5c945ea21a2aff4a3 Author: 10sr <8.slas...@gmail.com> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
Update doc --- README.md | 24 +++++++++++++++++------- doc/editorconfig.texi | 30 +++++++++++++++++++++++------- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 6215eb9f89..71f1824503 100644 --- a/README.md +++ b/README.md @@ -18,15 +18,25 @@ Alternatively, you can find the package available on * `charset` * `max_line_length` +* `file_type_ext` (Experimental) * `file_type_emacs` (Experimental) -This plugin also has an experimental support for `file_type_emacs`, -which specifies "file types" for files. -As for Emacs, it means `major-mode` can be specified: for example, -when `file_type_emacs` is set to `markdown` for `a.txt`, -`markdown-mode` will be enabled when opening `a.txt`. -This property is experimental and its meaning might change in -the future updates. + +### File Type + +This plugin also has experimental supports for `file_type_ext` and +`file_type_emacs`, which specify "file types" for files. +As for Emacs, it means `major-mode` can be set. + +**file_type_ext** When it is set to `md` for `a.txt`, for example, +`major-mode` will be decided as if the file name would be `a.txt.md` +(and thus `markdown-mode` is likely to be used). + +**file_type_emacs** When it is set to `markdown` for `a.txt`, +`markdown-mode` will be enabled when opening `a.txt`. + +These property are experimental and their meanings might change in the +future updates. When both are specified, `file_type_ext` takes precedence. ## Customize diff --git a/doc/editorconfig.texi b/doc/editorconfig.texi index a201279e9d..0b6817cf7e 100644 --- a/doc/editorconfig.texi +++ b/doc/editorconfig.texi @@ -84,6 +84,8 @@ trailing-newline-free @item @code{max_line_length} @item +@code{file_type_ext} (Experimental) +@item @code{file_type_emacs} (Experimental) @item @code{root} (only used by EditorConfig core) @@ -100,14 +102,28 @@ on our radar. Similarly, we don't yet hook in to all different packages for whitespace trimming to inform them about editorconfig settings, but aim for better coverage of things like @uref{ftp://ftp.lysator.liu.se/pub/emacs/ws-trim.el,ws-trim}. +@menu +* File Type:: +@end menu + +@node File Type +@subsection File Type +@anchor{#file-type} +This plugin also has experimental supports for @code{file_type_ext} and +@code{file_type_emacs}, which specify ``file types'' for files. As for +Emacs, it means @code{major-mode} can be set. + +@strong{file_type_ext} When it is set to @code{md} for @code{a.txt}, for +example, @code{major-mode} will be decided as if the file name would be +@code{a.txt.md} (and thus @code{markdown-mode} is likely to be used). + +@strong{file_type_emacs} When it is set to @code{markdown} for +@code{a.txt}, @code{markdown-mode} will be enabled when opening +@code{a.txt}. -This plugin also has an experimental support for @code{file_type_emacs}, -which specifies ``file types'' for files. As for Emacs, it means -@code{major-mode} can be specified: for example, when -@code{file_type_emacs} is set to @code{markdown} for @code{a.txt}, -@code{markdown-mode} will be enabled when opening @code{a.txt}. This -property is experimental and its meaning might change in the future -updates. +These property are experimental and their meanings might change in the +future updates. When both are specified, @code{file_type_ext} takes +precedence. @node Customize @section Customize