The patch titled CodingStyle: add information about editor modelines has been added to the -mm tree. Its filename is codingstyle-add-information-about-editor-modelines.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: CodingStyle: add information about editor modelines From: Josh Triplett <josht@xxxxxxxxxxxxxxxxxx> I recently received a patch including a file that had a vim modeline, and I realized that nothing specifically proscribed that practice. Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- Documentation/CodingStyle | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+) diff -puN Documentation/CodingStyle~codingstyle-add-information-about-editor-modelines Documentation/CodingStyle --- a/Documentation/CodingStyle~codingstyle-add-information-about-editor-modelines +++ a/Documentation/CodingStyle @@ -738,6 +738,33 @@ need them. Feel free to peruse that hea defined that you shouldn't reproduce in your code. + Chapter 18: Editor modelines and other cruft + +Some editors can interpret configuration information embedded in source files, +indicated with special markers. For example, emacs interprets lines marked +like this: + +-*- mode: c -*- + +Or like this: + +/* +Local Variables: +compile-command: "gcc -DMAGIC_DEBUG_FLAG foo.c" +End: +*/ + +Vim interprets markers that look like this: + +/* vim:set sw=8 noet */ + +Do not include any of these in source files. People have their own personal +editor configurations, and your source files should not override them. This +includes markers for indentation and mode configuration. People may use their +own custom mode, or may have some other magic method for making indentation +work correctly. + + Appendix I: References _ Patches currently in -mm which might be from josht@xxxxxxxxxxxxxxxxxx are codingstyle-add-information-about-trailing-whitespace.patch codingstyle-add-information-about-editor-modelines.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html